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

np.object has been deprecated #23

Open
bittremieux opened this issue Jul 12, 2023 · 0 comments
Open

np.object has been deprecated #23

bittremieux opened this issue Jul 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@bittremieux
Copy link
Owner

NumPy 1.24.4 results in the following error:

2023-07-12 15:21:00,375 WARNING [py.warnings/MainProcess] warnings._showwarnmsg : /home/wout/.conda/envs/falcon/lib/python3.11/site-packages/falcon/cluster/cluster.py:509: FutureWarning: In the future `np.object` will be defined as the corresponding NumPy scalar.
neighborhoods_arr = np.empty(len(neighborhoods), dtype=np.object)

Traceback (most recent call last):
File "/home/wout/.conda/envs/falcon/bin/falcon", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/wout/.conda/envs/falcon/lib/python3.11/site-packages/falcon/falcon.py", line 181, in main
clusters = cluster.generate_clusters(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/wout/.conda/envs/falcon/lib/python3.11/site-packages/falcon/cluster/cluster.py", line 509, in generate_clusters
neighborhoods_arr = np.empty(len(neighborhoods), dtype=np.object)
^^^^^^^^^
File "/home/wout/.conda/envs/falcon/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.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. Did you mean: 'object_'?

This can be fixed by changing np.object to object here

@bittremieux bittremieux added the bug Something isn't working label Jul 12, 2023
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

1 participant