Skip to content

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

Open

Description

@Transurgeon

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)

Activity

  1. eriknw commented on Jan 8, 2025

    @eriknw
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions