Skip to content

Commit 6c527aa

Browse files
authored
Merge pull request #80 from CLIVAR-PRP/79_numpy-version-update-conflict_lee1043
Conflict with newer Numpy version
2 parents 1dbd59a + 36fdc0f commit 6c527aa

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/EnsoUvcdatToolsLib.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,22 @@
33
import copy
44
from datetime import date
55
from inspect import stack as INSPECTstack
6+
from packaging.version import Version
67
import ntpath
8+
import numpy
79
from numpy import array as NParray
810
from numpy import exp as NPexp
911
from numpy import histogram as NPhistogram
1012
from numpy import isnan as NPisnan
1113
from numpy import nan as NPnan
1214
from numpy import nonzero as NPnonzero
1315
from numpy import ones as NPones
14-
from numpy import product as NPproduct
16+
17+
if Version(numpy.__version__) < Version('1.25.0'):
18+
from numpy import product as NPproduct
19+
else:
20+
from numpy import prod as NPproduct
21+
1522
from numpy import where as NPwhere
1623
from numpy.ma.core import MaskedArray as NPma__core__MaskedArray
1724
from os.path import isdir as OSpath_isdir

0 commit comments

Comments
 (0)