tlambert03 / nd2

Full-featured nd2 (Nikon NIS Elements) file reader for python. Outputs to numpy, dask, and xarray. Exhaustive metadata extraction
https://tlambert03.github.io/nd2
BSD 3-Clause "New" or "Revised" License
53 stars 15 forks source link

Incompatibility with numpy<=1.21 #45

Closed zjniu closed 2 years ago

zjniu commented 2 years ago

Description

The package seems to be currently incompatible with numpy<=1.21. On numpy==1.22.3, it works just fine, but downgrading to 1.21.5 for example gives the following error.

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

This is problematic because numba currently only supports numpy<=1.21 and it is very commonly used in a lot of packages.

What I Did

import nd2
nd2.imread('some.nd2')
tlambert03 commented 2 years ago

thanks, yeah I've seen that too, need to fix the wheel. Please try the conda version for now conda install -c conda-forge nd2

zjniu commented 2 years ago

The conda version works just as expected, thanks! By any chance, will the pip version be fixed when the next version is released?

tlambert03 commented 2 years ago

Yes I think I know what needs to be changed, and will do so before I release again to pypi

tlambert03 commented 2 years ago

v0.2.2 released on pypi, and should work now. thanks