mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-15 01:19:21 +08:00
Close a couple edge case bugs: hadamard and addmm on empty inputs (#2177)
* handle hadamard and addmm on empty inputs * fix
This commit is contained in:
@@ -2830,6 +2830,9 @@ class TestOps(mlx_tests.MLXTestCase):
|
||||
return H
|
||||
|
||||
def test_hadamard(self):
|
||||
with self.assertRaises(ValueError):
|
||||
mx.hadamard_transform(mx.array([]))
|
||||
|
||||
h28_str = """
|
||||
+------++----++-+--+-+--++--
|
||||
-+-----+++-----+-+--+-+--++-
|
||||
|
||||
Reference in New Issue
Block a user