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

Method test_array_from_noncontiguous_np

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

Source from the content-addressed store, hash-verified

759 self.assertEqual(b_npy.dtype, np_dtype)
760
761 def test_array_from_noncontiguous_np(self):
762 for t in [np.int8, np.int32, np.float16, np.float32, np.complex64]:
763 np_arr = np.random.uniform(size=(10, 10)).astype(np.complex64)
764 np_arr = np_arr.T
765 mx_arr = mx.array(np_arr)
766 self.assertTrue(mx.array_equal(np_arr, mx_arr))
767
768 def test_array_np_shape_dim_check(self):
769 a_npy = np.empty(2**31, dtype=np.bool_)

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.60

Tested by

no test coverage detected