mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-10 12:33:12 +08:00
Fix array initialization from list (#942)
* Fix array initialization from list * Change the error message in the test
This commit is contained in:

committed by
GitHub

parent
110d9b149d
commit
02fedbf1da
@@ -391,7 +391,9 @@ class TestArray(mlx_tests.MLXTestCase):
|
||||
# shape check from `stack()`
|
||||
with self.assertRaises(ValueError) as e:
|
||||
mx.array([x, 1.0])
|
||||
self.assertEqual(str(e.exception), "All arrays must have the same shape")
|
||||
self.assertEqual(
|
||||
str(e.exception), "Initialization encountered non-uniform length."
|
||||
)
|
||||
|
||||
# shape check from `validate_shape`
|
||||
with self.assertRaises(ValueError) as e:
|
||||
|
Reference in New Issue
Block a user