Skip to content

numpy 2.0 update #97

@enryH

Description

@enryH

It looks like currently the installation uses numpy 2.* - which leads to errors:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.9/x64/bin/move-dl", line 5, in <module>
    from move.__main__ import main
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/move/__init__.py", line 5, in <module>
    from move import conf, data, models  # noqa:E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/move/conf/__init__.py", line 3, in <module>
    from move.conf.schema import MOVEConfig
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/move/conf/schema.py", line 18, in <module>
    from move.models.vae import VAE
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/move/models/__init__.py", line 3, in <module>
    from move.models.vae import VAE
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/move/models/vae.py", line 10, in <module>
    from move.core.typing import FloatArray, IntArray
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/move/core/__init__.py", line 3, in <module>
    from move.core import logging, typing
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/move/core/typing.py", line 13, in <module>
    FloatArray = NDArray[np.float_]
                         ^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/numpy/__init__.py", line 397, in __getattr__
    raise AttributeError(
AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.. Did you mean: 'float[16](https://github.com/RasmussenLab/MOVE/actions/runs/9566168242/job/26370771716?pr=95#step:5:17)'?

@ri-heme Should we switch to np.float64 in the type annotations?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions