-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Working on a project that has netCDF4
as an optional dependency, I encountered an error in CI that looks like ABI incompatibility between the runtime numpy version used and the one that was used to compile netCDF4
from ._netCDF4 import *
src/netCDF4/_netCDF4.pyx:1: in init netCDF4._netCDF4
???
E RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility. Expected 16 from C header, got 88 from PyObject
Probably not very useful but here's the project in question for reference yt-project/yt#3270 (comment)
So I came here to check which numpy versions were used to build wheels and I think that indeed there could lie an explanation for the bug I encountered. See https://github.com/scipy/oldest-supported-numpy for an explanation and a curated list of oldest numpy versions that can be used to build robust wheels.
I'm not sure how easy it would be to adapt or adopt https://github.com/scipy/oldest-supported-numpy here.
Note that I encountered this bug only within yt's testing framework. I'm not 100% convinced that netCDF4's wheel are faulty, but the error message is identical to one that got reported numerous times from yt users about yt itself, and adopting https://github.com/scipy/oldest-supported-numpy seems to have fixed our system.