We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acd95e1 commit a219727Copy full SHA for a219727
src/wrf/constants.py
@@ -7,9 +7,6 @@
7
from .py3compat import viewitems
8
from ._wrffortran import wrf_constants, omp_constants
9
10
-from packaging.version import Version
11
-np_version = Version(np.__version__)
12
-
13
#: Indicates that all times should be used in a diagnostic routine.
14
ALL_TIMES = None
15
@@ -66,8 +63,10 @@ class ProjectionTypes(object):
66
63
np.dtype(np.float64): Constants.DEFAULT_FILL_DOUBLE
67
64
}
68
65
69
-if np_version < Version('2.0'):
70
- _DEFAULT_FILL_MAP[np.float_] = Constants.Constants.DEFAULT_FILL_DOUBLE
+try:
+ _DEFAULT_FILL_MAP[np.dtype(np.float_)] = Constants.DEFAULT_FILL_DOUBLE
+except AttributeError:
+ pass
71
72
if version_info >= (3, ):
73
_DEFAULT_FILL_MAP[np.int_] = Constants.DEFAULT_FILL_INT64
0 commit comments