Skip to content

Commit 56180d8

Browse files
nbadami123facebook-github-bot
authored andcommitted
remove Numpy-2.0 incompatible use of numpy.product
Summary: Replaced with numpy.prod in Numpy 2.0+. Used ruff to replace instances. Reviewed By: florazzz Differential Revision: D81735558
1 parent 1a7441f commit 56180d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backends/cadence/aot/tests/test_ref_implementations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ def test_quantized_linear(
214214
expected_output: torch.Tensor,
215215
) -> None:
216216
src = (
217-
torch.arange(np.product(src_shape))
217+
torch.arange(np.prod(src_shape))
218218
.reshape(src_shape)
219219
.to(expected_output.dtype)
220220
)
221221
weight = (
222-
torch.arange(np.product(weight_shape))
222+
torch.arange(np.prod(weight_shape))
223223
.reshape(weight_shape)
224224
.to(expected_output.dtype)
225225
)

0 commit comments

Comments
 (0)