Closed Tripfantasy closed 7 months ago
Facing the same issue:
AttributeError: module 'numpy' has no attribute 'object'.
np.object
was a deprecated alias for the builtinobject
. To avoid this error in existing code, useobject
by 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_'?
Please note that I tried downgrading the pyscenic to 0.12.0 but it gets stuck on this same command: pyscenic grn "${f_loom_path_scenic}" "${f_tfs}" -o adj.csv --num_workers 16
2024-03-29 00:48:52,260 - pyscenic.cli.pyscenic - INFO - Loading expression matrix.
2024-03-29 00:49:55,833 - pyscenic.cli.pyscenic - INFO - Inferring regulatory networks. preparing dask client parsing input creating dask graph 16 partitions computing dask graph /ahg/regevdata/projects/ICA_Lung/Nishant/conda/envs/pyscenic3pt8/lib/python3.8/site-packages/distributed/client.py:3108: UserWarning: Sending large graph of size 2.80 GiB. This may cause some slowdown. Consider scattering data ahead of time and using futures. warnings.warn(
Facing the same issue:
Hello, have you tried looking at /micromamba/envs/pyscenic/lib/python3.10/site-packages/numpy/__init__.py", line 324
? It has a dictionary of aliases and datatypes. See if it matches what I have in the potential solution in the third point of my post.
I am interested to see if just changing the value like I had fixes it for others as well.
Facing the same issue:
Hello, have you tried looking at
/micromamba/envs/pyscenic/lib/python3.10/site-packages/numpy/__init__.py", line 324
? It has a dictionary of aliases and datatypes. See if it matches what I have in the potential solution in the third point of my post.I am interested to see if just changing the value like I had fixes it for others as well.
I just updated my _type_info dictionary, and it doesn't throw that error anymore. I'll let you know if it runs successfully.
Update 1: It didn't work for me, it kept giving me some other issues with the package. Trying with the installation of pySCENIC from git now.
Update 2: Installation from git repo worked successfully!
Installing pySCENIC from git should fix this: https://github.com/aertslab/pySCENIC/commit/eaf23eb1fdcaae79b273de56b374b71aa8afde5a
I am facing the very same issue. Judging by the error message this can be easily fixed by just changing to object
as written below:
AttributeError: module 'numpy' has no attribute 'object'.
`np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by 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
I understand that this may not occur when installing from git. However, the proposed mode of installation in the docs is pip
so changing to object
would also up the usability of the package
Edit: Just saw that this has already been done. So it is really an issue with the version fetched from PyPI
Describe the bug When running pySCENIC CLI GRN step, the function is halted by an error which seems to be sourced by the use of a deprecated numpy alias "np.object0" in _type_info dictionary in numpy's init.py
Before I would be warned about a deprecated alias, but it wouldn't stop the function from completing entirely. I have manually changed the value as seen below, but I'm not sure if there is a different method of avoiding this? Thanks in advance!
Steps to reproduce the behavior
Command run when the error occurred:
Error encountered:
Expected behavior When running grn on CLI, I expect it to load the expression matrix first, then prepare the dask graph. Once it loads, it should begin calculating adjacencies.
I also expect there to be a couple deprecation warnings, for example- the numpy.object deprecated alias warning, as well as a "NumbaDeprecationWarning: nopython keyword" warning. These warnings typically do not halt the function, but as mentioned before- the numpy one seems to as of this past week.
Please complete the following information: