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

Sasmodel not supporting numpy 2.x, re-check when available #100

Open
bobleesj opened this issue Nov 19, 2024 · 0 comments
Open

Sasmodel not supporting numpy 2.x, re-check when available #100

bobleesj opened this issue Nov 19, 2024 · 0 comments

Comments

@bobleesj
Copy link

Running

        print(load_model_info("ellipsoid"))

provides the following error:

===================================================== ERRORS ======================================================
_______________________________________ ERROR collecting tests/test_sas.py ________________________________________
tests/test_sas.py:66: in <module>
    from sasmodels.core import load_model, load_model_info
/Users/imac/miniconda3/envs/srfit_env/lib/python3.11/site-packages/sasmodels/core.py:22: in <module>
    from . import generate
/Users/imac/miniconda3/envs/srfit_env/lib/python3.11/site-packages/sasmodels/generate.py:173: in <module>
    from .modelinfo import Parameter
/Users/imac/miniconda3/envs/srfit_env/lib/python3.11/site-packages/sasmodels/modelinfo.py:82: in <module>
    def parse_parameter(name, units='', default=np.NaN,
/Users/imac/miniconda3/envs/srfit_env/lib/python3.11/site-packages/numpy/__init__.py:400: in __getattr__
    raise AttributeError(
E   AttributeError: `np.NaN` was removed in the NumPy 2.0 release. Use `np.nan` instead.

How to navigate for now

Reinstall numpy:

    Found existing installation: numpy 2.1.3
    Uninstalling numpy-2.1.3:
      Successfully uninstalled numpy-2.1.3
Successfully installed numpy-1.26.4

======== 2 passed, 2 warnings in 3.74s =========

Reference

There is a pending PR below.

SasView/sasmodels#613

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

1 participant