Skip to content

Commit c4249f4

Browse files
authored
Replace deprecated Numpy's product by prod (#347)
Replace the deprecated `numpy.product` function for `numpy.prod`. `numpy.product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0.
1 parent 4f1e334 commit c4249f4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

discretize/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,8 @@ def random(size, iscomplex):
845845
return out
846846

847847
# Create random vectors u and v.
848-
u = random(np.product(shape_u), complex_u).reshape(shape_u)
849-
v = random(np.product(shape_v), complex_v).reshape(shape_v)
848+
u = random(np.prod(shape_u), complex_u).reshape(shape_u)
849+
v = random(np.prod(shape_v), complex_v).reshape(shape_v)
850850

851851
# Carry out dot product test.
852852
fwd_u = forward(u)

0 commit comments

Comments
 (0)