radiocosmology / draco

A pipeline for the analysis and simulation of drift scan radio data
MIT License
9 stars 7 forks source link

BUG: numpy >= 2 causes binary compatibility issues with bit shuffle #278

Closed ljgray closed 4 months ago

ljgray commented 4 months ago

Trying to import anything that import from bitshuffle returns the following error with numpy>=2

test/test_containers.py:4: in <module>
    from draco.core import containers
draco/core/containers.py:64: in <module>
    from caput import memh5, mpiarray, tod
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/caput/memh5.py:67: in <module>
    from . import fileformats, misc, mpiarray, mpiutil, tools
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/caput/fileformats.py:21: in <module>
    from bitshuffle.h5 import H5_COMPRESS_LZ4, H5FILTER
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/bitshuffle/__init__.py:24: in <module>
    from bitshuffle.ext import (
bitshuffle/ext.pyx:1: in init bitshuffle.ext
    ???
E   ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

This is fixed by pinning numpy < 2, but I need to investigate further to figure out the underlying problem