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

Method test_array_neg

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

Source from the content-addressed store, hash-verified

872 self.assertEqual((a >= 1).tolist(), [False, True, True])
873
874 def test_array_neg(self):
875 a = mx.array([-1.0, 4.0, 0.0])
876
877 self.assertEqual((-a).tolist(), [1.0, -4.0, 0.0])
878
879 def test_array_type_cast(self):
880 a = mx.array([0.1, 2.3, -1.3])

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.60

Tested by

no test coverage detected