Skip to content

use of deprecated np.NaN instead of np.nan: fails with numpy >= 2.0 #108

@orbeckst

Description

@orbeckst

As part of running MDAKit tests https://github.com/MDAnalysis/MDAKits/actions/runs/16355349978/job/46212233563#step:10:169 the following error came up:

==================================== ERRORS ====================================
_____________________ ERROR collecting test_rdf_parser.py ______________________
../../../miniconda3/envs/test/lib/python3.12/site-packages/solvation_analysis/tests/test_rdf_parser.py:88: in <module>
    ("fec_F", np.NaN),
              ^^^^^^
../../../miniconda3/envs/test/lib/python3.12/site-packages/numpy/__init__.py:781: in __getattr__
    raise AttributeError(
E   AttributeError: `np.NaN` was removed in the NumPy 2.0 release. Use `np.nan` instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions