You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
glaes/glaes/core/ExclusionCalculator.py:238: in init
s.maskPixels = s.region.mask.sum()
../../../miniconda3/envs/test_env/lib/python3.8/site-packages/geokit/core/regionmask.py:470: in mask
self.buildMask()
../../../miniconda3/envs/test_env/lib/python3.8/site-packages/geokit/core/regionmask.py:457: in buildMask
**kwargs).astype(np.bool)
attr = 'bool'
def __getattr__(attr):
# Warn for expired attributes, and return a dummy function
# that always raises an exception.
import warnings
try:
msg = __expired_functions__[attr]
except KeyError:
pass
else:
warnings.warn(msg, DeprecationWarning, stacklevel=2)
def _expired(*args, **kwds):
raise RuntimeError(msg)
return _expired
# Emit warnings for deprecated attributes
try:
val, msg = __deprecated_attrs__[attr]
except KeyError:
pass
else:
warnings.warn(msg, DeprecationWarning, stacklevel=2)
return val
if attr in __future_scalars__:
# And future warnings for those that will change, but also give
# the AttributeError
warnings.warn(
f"In the future `np.{attr}` will be defined as the "
"corresponding NumPy scalar.", FutureWarning, stacklevel=2)
if attr in __former_attrs__:
raise AttributeError(__former_attrs__[attr])
E AttributeError: module 'numpy' has no attribute 'bool'.
E np.bool was a deprecated alias for the builtin bool. To avoid this error in existing code, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
E The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
E https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Geokit 1.40 is incompatible to numpy numpy>=1.24. The dependency constraint should be included.
The error occurs the buildMask function. It can be repoduced by running the test_ExclusionCalculator.py from glaes.
----------------------------- Captured stderr call -----------------------------
pj_obj_create: Open of /home/runner/miniconda3/envs/test_env/share/proj failed
________________________ test_ExclusionCalculator_save _________________________
glaes/glaes/test/test_ExclusionCalculator.py:60:
glaes/glaes/core/ExclusionCalculator.py:238: in init
s.maskPixels = s.region.mask.sum()
../../../miniconda3/envs/test_env/lib/python3.8/site-packages/geokit/core/regionmask.py:470: in mask
self.buildMask()
../../../miniconda3/envs/test_env/lib/python3.8/site-packages/geokit/core/regionmask.py:457: in buildMask
**kwargs).astype(np.bool)
attr = 'bool'
E AttributeError: module 'numpy' has no attribute 'bool'.
E
np.bool
was a deprecated alias for the builtinbool
. To avoid this error in existing code, usebool
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.bool_
here.E The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
E https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
../../../miniconda3/envs/test_env/lib/python3.8/site-packages/numpy/init.py:305: AttributeError
The text was updated successfully, but these errors were encountered: