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

cooler version 0.8.11 incompatible with numpy 1.24 #303

Closed
lldelisle opened this issue Jan 13, 2023 · 4 comments
Closed

cooler version 0.8.11 incompatible with numpy 1.24 #303

lldelisle opened this issue Jan 13, 2023 · 4 comments

Comments

@lldelisle
Copy link

Hi,
I got an error:

>>> import cooler
/home/ldelisle/.conda/envs/test2/lib/python3.8/site-packages/cooler/util.py:690: FutureWarning: In the future `np.object` will be defined as the corresponding NumPy scalar.  (This may have returned Python scalars in past versions.
  columns, dtype=None, index_columns=None, index_names=None, default_dtype=np.object
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ldelisle/.conda/envs/test2/lib/python3.8/site-packages/cooler/__init__.py", line 14, in <module>
    from .api import Cooler, annotate
  File "/home/ldelisle/.conda/envs/test2/lib/python3.8/site-packages/cooler/api.py", line 22, in <module>
    from .util import parse_cooler_uri, parse_region, open_hdf5, closing_hdf5
  File "/home/ldelisle/.conda/envs/test2/lib/python3.8/site-packages/cooler/util.py", line 690, in <module>
    columns, dtype=None, index_columns=None, index_names=None, default_dtype=np.object
  File "/home/ldelisle/.conda/envs/test2/lib/python3.8/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'object'
>>> 

This error seems to be linked to numpy 1.24 as import cooler works if I use numpy 1.23.
Should I update the conda recipe?

@lldelisle
Copy link
Author

I wrote a PR to update the bioconda recipe: bioconda/bioconda-recipes#38816

@golobor
Copy link
Member

golobor commented Jan 13, 2023

@nvictus , couldn't the solution be to use np.object_ instead?..

@nvictus
Copy link
Member

nvictus commented Jan 13, 2023

@nvictus , couldn't the solution be to use np.object_ instead?

Yes, @robomics has already made the PR and I merged it earlier this week.

v3.9 will be coming out shortly and this will be fixed. In the meantime, updating the conda recipe for 0.8.11 or 0.8.* makes sense.

Should I update the conda recipe?

Yes. Thank you, @lldelisle!

@nvictus
Copy link
Member

nvictus commented Jan 19, 2023

Fixed by db9478a

@nvictus nvictus closed this as completed Jan 19, 2023
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

3 participants