You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get AttributeError: module 'numpy' has no attribute 'str' when trying to load pbmc data
adata=scvi.data.pbmc_dataset()
INFO File data/gene_info_pbmc.csv already downloaded
INFO File data/pbmc_metadata.pickle already downloaded
INFO File data/pbmc8k/filtered_gene_bc_matrices.tar.gz already downloaded
INFO Extracting tar file
INFO Removing extracted data at data/pbmc8k/filtered_gene_bc_matrices
INFO File data/pbmc4k/filtered_gene_bc_matrices.tar.gz already downloaded
INFO Extracting tar file
INFO Removing extracted data at data/pbmc4k/filtered_gene_bc_matrices
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-9-2b688d4bab92>](https://localhost:8080/#) in <cell line: 1>()
1if dataset_name =="PBMC_10K":
----> 2 adata = scvi.data.pbmc_dataset() # 11990 × 3346
3 ori_batch_col ="batch"4 adata.obs["celltype"] = adata.obs["str_labels"].astype("category")
5 adata.var = adata.var.set_index("gene_symbols")
2 frames
[/usr/local/lib/python3.10/dist-packages/numpy/__init__.py](https://localhost:8080/#) in __getattr__(attr)
317# And future warnings for those that will change, but also give318# the AttributeError
--> 319 warnings.warn(
320f"In the future `np.{attr}` will be defined as the "321"corresponding NumPy scalar.", FutureWarning, stacklevel=2)
AttributeError: module 'numpy' has no attribute 'str'.
`np.str` was a deprecated alias for the builtin `str`. To avoid this error in existing code, use `str` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.str_` here.
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```
#### Versions:
1.16.4
The text was updated successfully, but these errors were encountered:
Get
AttributeError: module 'numpy' has no attribute 'str'
when trying to load pbmc dataThe text was updated successfully, but these errors were encountered: