(self)
| 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_) |