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 binary incompatibility warning #1354

Open
hassec opened this issue Jul 31, 2024 · 0 comments
Open

Numpy binary incompatibility warning #1354

hassec opened this issue Jul 31, 2024 · 0 comments

Comments

@hassec
Copy link

hassec commented Jul 31, 2024

To create a minimal reproducer (I used Python 3.11.9):

python -m venv test_nc4
source test_nc4/bin/activate
pip install netcdf4
python -c "import numpy;import warnings;warnings.filterwarnings('error');import netCDF4"

This will raise an error with:
numpy.ndarray size changed, may indicate binary incompatibility. Expected 16 from C header, got 96 from PyObject

This isn't numpy 2.0 specific, pip install netcdf4 "numpy<2.0" will raise the same warning.

To the best of my understanding this means that the numpy that was used during the netcdf4 build is incompatible with the numpy version I'm using.

I know that this is usually just a warning, but this means I've got to manually ignore these in my pytest suite.

It's also hard to gauge for a user whether this warning is problematic. Thus I'm wondering if this can be fixed on the netcdf4 side?

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