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

Method test_sum_bool

python/tests/test_reduce.py:127–132  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

125 self.assertTrue(np.all(z == y))
126
127 def test_sum_bool(self):
128 x = np.random.uniform(0, 1, size=(10, 10, 10)) > 0.5
129 y = mx.array(x)
130 npsum = x.sum().item()
131 mxsum = y.sum().item()
132 self.assertEqual(npsum, mxsum)
133
134 def test_many_reduction_axes(self):
135

Callers

nothing calls this directly

Calls 2

itemMethod · 0.80
arrayMethod · 0.60

Tested by

no test coverage detected