From d8069a269b8294a2deaad756f31e5bf7893320d6 Mon Sep 17 00:00:00 2001 From: Ricardo Vieira Date: Fri, 28 Jun 2024 14:33:54 +0200 Subject: [PATCH] Actually test boolean indexing --- tests/link/jax/test_subtensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/link/jax/test_subtensor.py b/tests/link/jax/test_subtensor.py index 173a7b8c5f..489fbb010e 100644 --- a/tests/link/jax/test_subtensor.py +++ b/tests/link/jax/test_subtensor.py @@ -67,7 +67,7 @@ def test_jax_Subtensor_constant(): compare_jax_and_py(out_fg, [x_np]) # Boolean indexing should work if indexes are constant - out_pt = x_pt[np.random.binomial(1, 0.5, size=(3, 4, 5))] + out_pt = x_pt[np.random.binomial(1, 0.5, size=(3, 4, 5)).astype(bool)] out_fg = FunctionGraph([x_pt], [out_pt]) compare_jax_and_py(out_fg, [x_np])