Skip to content

Commit e529b58

Browse files
- bug fix: np.product is deprecated in numpy 2.0
1 parent f2831f9 commit e529b58

4 files changed

Lines changed: 159 additions & 52 deletions

File tree

examples/spotter_data_archive.ipynb

Lines changed: 70 additions & 34 deletions
Large diffs are not rendered by default.

examples/spotter_sdcard_data.ipynb

Lines changed: 84 additions & 16 deletions
Large diffs are not rendered by default.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setuptools.setup(
88
name="roguewavespectrum",
9-
version="0.2.18",
9+
version="0.2.19",
1010
license="Apache 2 License",
1111
install_requires=[
1212
"numpy",

src/roguewavespectrum/_spectrum.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,10 @@ def flatten(self: "Spectrum", flattened_coordinate="index") -> "Spectrum":
510510
length = 1
511511
shape = (1,)
512512
else:
513-
length = np.product(shape)
513+
try:
514+
length = np.product(shape)
515+
except AttributeError:
516+
length = np.prod(shape)
514517

515518
# Calculate the flattened shape
516519
new_shape = (length,)

0 commit comments

Comments
 (0)