Skip to content

BUG: Not NumPy 2.0 compatible #325

@larsoner

Description

@larsoner

Modules need to be rebuilt and released now that NumPy 2.0 EDIT: RC1 is out. Importing current cftime from PyPI I get on Linux:

>>> import cftime

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.0.dev0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "<stdin>", line 1, in <module>
  File "/home/larsoner/python/virtualenvs/base/lib/python3.11/site-packages/cftime/__init__.py", line 1, in <module>
    from ._cftime import (datetime, real_datetime,
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/larsoner/python/virtualenvs/base/lib/python3.11/site-packages/cftime/__init__.py", line 1, in <module>
    from ._cftime import (datetime, real_datetime,
  File "src/cftime/_cftime.pyx", line 1, in init cftime._cftime
ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use '<void>numpy._import_array' to disable if you are certain you don't need it).

See also numpy/numpy#24300 (comment)

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