Skip to content

Commit

Permalink
Fix latest numpy compatibility: np.product no longer exists
Browse files Browse the repository at this point in the history
  • Loading branch information
sbird committed Aug 20, 2024
1 parent 3d72c43 commit bed9043
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
output = buffer.view_output()

# denormalize the forward transform
output /= numpy.product(partition.n)
output /= numpy.prod(partition.n)

iplan.execute(buffer)

Expand Down
2 changes: 1 addition & 1 deletion scripts/pfft-roundtrip-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def test_roundtrip_3d(procmesh, type, flags, inplace, Nmesh):
bpreserr = 0.0

if input.size > 0:
input[:] /= numpy.product(Nmesh)
input[:] /= numpy.prod(Nmesh)
# some distributions have no input value
c2rerr = numpy.abs(original - input).max()
else:
Expand Down

0 comments on commit bed9043

Please sign in to comment.