Skip to content

Commit ba29b37

Browse files
committed
dont wrap
1 parent ad29c17 commit ba29b37

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tests/link/mlx/test_math.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import mlx.core as mx
21
import numpy as np
32

43
import pytensor
@@ -12,9 +11,12 @@ def test_mlx_dot():
1211
out = x.dot(y)
1312
fn = pytensor.function([x, y], out, mode="MLX")
1413

15-
test_x = mx.array(np.random.normal(size=(3, 2)))
16-
test_y = mx.array(np.random.normal(size=(2, 4)))
17-
np.testing.assert_allclose(
18-
fn(test_x, test_y),
19-
np.dot(test_x, test_y),
20-
)
14+
seed = sum(map(ord, "test_mlx_dot"))
15+
rng = np.random.default_rng(seed)
16+
17+
test_x = rng.normal(size=(3, 2))
18+
test_y = rng.normal(size=(2, 4))
19+
20+
actual = fn(test_x, test_y)
21+
expected = np.dot(test_x, test_y)
22+
np.testing.assert_allclose(actual, expected)

0 commit comments

Comments
 (0)