Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

equi7grid package not working with numpy >= 1.24.0 #29

Open
tobiasstachl opened this issue Dec 28, 2022 · 0 comments
Open

equi7grid package not working with numpy >= 1.24.0 #29

tobiasstachl opened this issue Dec 28, 2022 · 0 comments

Comments

@tobiasstachl
Copy link

tobiasstachl commented Dec 28, 2022

Dear all,

np.int does not work anymore with the latest numpy version (1.24.0). See the deprecation warning below when using numpy==1.20.3.

site-packages/equi7grid/equi7grid.py:557: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. 
To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. 
When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. 
If you wish to review your current use, check the release note link for additional information.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    np.int(llx) // 100000,

Exception traceback when using numpy version 1.24.0

e7tile = e7grid.create_tile(e7t)
  File "/venv/lib/python3.9/site-packages/equi7grid/equi7grid.py", line 278, in create_tile
    return self.subgrids[name[0:2]].tilesys.create_tile(name)
  File "/venv/lib/python3.9/site-packages/equi7grid/equi7grid.py", line 505, in create_tile
    name = self._encode_tilename(llx, lly)
  File "/venv/lib/python3.9/site-packages/equi7grid/equi7grid.py", line 596, in _encode_tilename
    return self.encode_tilename(llx, lly, self.core.sampling, self.core.tiletype, shortform=shortform)
  File "/venv/lib/python3.9/site-packages/equi7grid/equi7grid.py", line 567, in encode_tilename
    np.int(llx) // 100000, np.int(lly) // 100000, tilecode)
  File "/venv/lib/python3.9/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'int'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant