proplot-dev / proplot

🎨 A succinct matplotlib wrapper for making beautiful, publication-quality graphics
https://proplot.readthedocs.io
MIT License
1.07k stars 96 forks source link

Latest proplot version incompatible with numpy 1.24.1 #406

Closed Quba1 closed 1 year ago

Quba1 commented 1 year ago

Description

Latest proplot version (0.9.5) seems to be incompatible with numpy 1.24.1 because of deprecation of np.int as suggested by this issue.

Steps to reproduce

fig, axs = pplt.subplots(nrows=3, ncols=3)

Expected behavior:

No error

Actual behavior:

AtributeError

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/mambaforge/envs/noc/lib/python3.10/site-packages/proplot/ui.py", line 192, in subplots
    axs = fig.add_subplots(*args, **kwsubs)
  File "/home/user/mambaforge/envs/noc/lib/python3.10/site-packages/proplot/figure.py", line 1324, in add_subplots
    array = array.astype(np.int)
  File "/home/user/mambaforge/envs/noc/lib/python3.10/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'int'. Did you mean: 'inf'?

Proplot version

matplotlib 3.4.3 proplot 0.9.5 numpy 1.24.1

zxdawn commented 1 year ago

This has been fixed in d6ab941c2d446d4f27ac1398d8eace3b12584bd3. You can try to install proplot from the master branch.

Quba1 commented 1 year ago

I honestly don't think installing from master is a solution, merely a workaround. It has been a year since this bug has been found and fixed. Would it be possible to release a bugfix for that (and other issues)?

zxdawn commented 1 year ago

Sorry, I'm not the collaborator of this repo and can't release a new version ... From the user end, I'm afraid that installing from the master branch is the current solution.

Quba1 commented 1 year ago

Oh, sorry, for that. Thanks for the workaround then.

lukelbd commented 1 year ago

Sorry for the delay responding to this. The new release v0.9.7 adds matplotlib/numpy dependency fixes to the previous stable version v0.9.5 (see comments in #309).