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

Method parse_h_string

python/tests/test_ops.py:2971–2974  ·  view source on GitHub ↗
(h_str)

Source from the content-addressed store, hash-verified

2969 """
2970
2971 def parse_h_string(h_str):
2972 return np.array(
2973 [[1 if s == "+" else -1 for s in row] for row in h_str.split()]
2974 )
2975
2976 h28 = parse_h_string(h28_str)
2977

Callers

nothing calls this directly

Calls 2

arrayMethod · 0.60
splitMethod · 0.45

Tested by

no test coverage detected