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

Method test_array_ne_scalar

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

Source from the content-addressed store, hash-verified

169 self.assertTrue(mx.any(a != c))
170
171 def test_array_ne_scalar(self):
172 a = mx.array([1, 2, 3])
173 b = 1
174 c = 4
175 d = 1.5
176 e = 2.5
177 f = mx.array([1, 2.5, 3.25])
178 self.assertFalse(mx.all(a != b))
179 self.assertTrue(mx.any(a != c))
180 self.assertTrue(mx.any(a != d))
181 self.assertTrue(mx.any(a != e))
182 self.assertFalse(mx.all(a != f))
183
184 def test_list_not_equals_array(self):
185 a = mx.array([1, 2, 3])

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.60

Tested by

no test coverage detected