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

Method test_array_eq_scalar

python/tests/test_array.py:131–140  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

129 self.assertFalse(mx.all(a == c))
130
131 def test_array_eq_scalar(self):
132 a = mx.array([1, 2, 3])
133 b = 1
134 c = 4
135 d = 2.5
136 e = mx.array([1, 2.5, 3.25])
137 self.assertTrue(mx.any(a == b))
138 self.assertFalse(mx.all(a == c))
139 self.assertFalse(mx.all(a == d))
140 self.assertTrue(mx.any(a == e))
141
142 def test_list_equals_array(self):
143 a = mx.array([1, 2, 3])

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.60

Tested by

no test coverage detected