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

[BUG]pyscenic error with numpy has no attribute 'object' #579

Open
anyang-kevin opened this issue Sep 25, 2024 · 2 comments
Open

[BUG]pyscenic error with numpy has no attribute 'object' #579

anyang-kevin opened this issue Sep 25, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@anyang-kevin
Copy link

pyscenic grn /public/home/anyang/tool/conda/miniconda3/envs/scanpy/lib/python3.11/site-packages/pyscenic/transform.py:42: FutureWarning: In the future np.objectwill be defined as the corresponding NumPy scalar. ("Enrichment", COLUMN_NAME_ANNOTATION): np.object, Traceback (most recent call last): File "/public/home/anyang/tool/conda/miniconda3/envs/scanpy/bin/pyscenic", line 5, in <module> from pyscenic.cli.pyscenic import main File "/public/home/anyang/tool/conda/miniconda3/envs/scanpy/lib/python3.11/site-packages/pyscenic/cli/pyscenic.py", line 26, in <module> from pyscenic.prune import _prepare_client, find_features, prune2df File "/public/home/anyang/tool/conda/miniconda3/envs/scanpy/lib/python3.11/site-packages/pyscenic/prune.py", line 27, in <module> from .transform import ( File "/public/home/anyang/tool/conda/miniconda3/envs/scanpy/lib/python3.11/site-packages/pyscenic/transform.py", line 42, in <module> ("Enrichment", COLUMN_NAME_ANNOTATION): np.object, ^^^^^^^^^ File "/public/home/anyang/tool/conda/miniconda3/envs/scanpy/lib/python3.11/site-packages/numpy/__init__.py", line 305, in __getattr__ raise AttributeError(__former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'object'.np.objectwas a deprecated alias for the builtinobject. To avoid this error in existing code, use objectby itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'object_'?
Here is my error when i use pyscenic. My numpy version is 1.24.3. How do I fix it?

@anyang-kevin anyang-kevin added the bug Something isn't working label Sep 25, 2024
@anyang-kevin
Copy link
Author

Numpy deleted np.object in 1.20. The only way right now is change the code in pyscenic/transform.py. Change all np.object to object can call out the help page.

@ghuls
Copy link
Member

ghuls commented Oct 10, 2024

Use the latest git version of pySCENIC. This issue was fixed in: eaf23eb

Or use the existing container images of pySCENIC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants