MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / ReplaceBytes

Method ReplaceBytes

mlx/data/op/Replace.cpp:25–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25ReplaceBytes::ReplaceBytes(
26 const std::string& ikey,
27 std::vector<std::string> byte_map,
28 const std::string& okey)
29 : KeyTransformOp(ikey, okey), byte_map_(std::move(byte_map)) {
30 while (byte_map_.size() < 256) {
31 byte_map_.emplace_back("");
32 }
33}
34
35std::shared_ptr<Array> ReplaceBytes::apply_key(
36 const std::shared_ptr<const Array>& src) const {

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected