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

numpy 1.20 - AttributeError #95

Open
hrkloeck opened this issue Aug 27, 2024 · 2 comments
Open

numpy 1.20 - AttributeError #95

hrkloeck opened this issue Aug 27, 2024 · 2 comments

Comments

@hrkloeck
Copy link

  • Tricolour version: tricolour-0.1.8-py3.8
  • Python version:
  • Operating System: ubuntu:20.04

Description

Get an error:

File "/usr/local/lib/python3.8/dist-packages/tricolour-0.1.8-py3.8.egg/tricolour/mask.py", line 63, in load_mask
if mask.dtype[0] != np.bool or mask.dtype[1] != np.float64:
File "/usr/local/lib/python3.8/dist-packages/numpy/init.py", line 305, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
np.bool was a deprecated alias for the builtin bool. To avoid this error in existing code, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ 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

What I Did

generated a singularity, but some of the packages can not work with numpy 1.19.5

Any advice or help would be greatly appreciated

@bennahugo
Copy link
Collaborator

I have started working on a new release a while ago, but I haven't really had time to finish that work. There are still some new features that are needed for a release You can maybe just install the branch for now
https://github.com/ratt-ru/tricolour/tree/prepare-0.2.0

@hrkloeck
Copy link
Author

Perfect thanks a lot.

Just for completeness, this is how I included it into the container script.

Install tricolour 0.2 from dev branch

cd / \
&& git clone https://github.com/ratt-ru/tricolour --branch prepare-0.2.0 \
&& cd tricolour \
&& export PYTHONPATH=/opt/meersoft/lib/python3.8/site-packages/ \
&& python3 setup.py install \
&& cd ../ && rm -rf tricolour

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

2 participants