Skip to content

ValueError: numpy.dtype size changed, may indicate binary incompatibility. #551

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

Open
Transurgeon opened this issue Dec 9, 2024 · 1 comment

Comments

@Transurgeon
Copy link
Contributor

Transurgeon commented Dec 9, 2024

I am encountering an error that looks like the following. It is most likely related to NumPy compatibilities, maybe python-graphblas might not be compatible with 2.0.0?
I found an existing thread on stackoverflow, but the suggestions there did not fix the issue. Any help is appreciated!

       eye = gb.Vector.from_scalar(1, n).diag()
             ^^^^^^^^^
     File "/opt/anaconda3/envs/cvxpy_env/lib/python3.12/site-packages/graphblas/__init__.py", line 68, in __getattr__
       _init("suitesparse", None, automatic=True)
     File "/opt/anaconda3/envs/cvxpy_env/lib/python3.12/site-packages/graphblas/__init__.py", line 142, in _init
       from suitesparse_graphblas import ffi, initialize, is_initialized, lib
     File "/opt/anaconda3/envs/cvxpy_env/lib/python3.12/site-packages/suitesparse_graphblas/__init__.py", line 6, in <module>
       from . import utils
     File "suitesparse_graphblas/utils.pyx", line 1, in init suitesparse_graphblas.utils
   ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
   asv: benchmark failed (exit status 1)
@eriknw
Copy link
Member

eriknw commented Jan 8, 2025

Sorry you bumped into this! We are still working to get numpy 2 support in #546, which I think is getting close.

The error you are seeing originates from suitesparse_graphblas, which we also recently updated to support numpy 2. This was done on conda-forge in conda-forge/python-suitesparse-graphblas-feedstock#60 , which was merged Dec 20 (about three weeks ago).

I expect we'll release python-graphblas with support for numpy 2, Python 3.13, and SuiteSparse:GraphBLAS 9 in a couple-ish weeks (hopefully sooner since this is long overdue, but we'll see how many more bumps we run into). The next step is to rebuild python-suitesparse-graphblas on conda-forge for Python 3.13.

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

2 participants