Skip to content

error: 'PyArray_Descr' {aka 'struct _PyArray_Descr'} has no member named 'subarray' with meson numpy 2.2.2 #39662

@user202729

Description

@user202729

Environment

  • OS: Linux
  • Sage Version: latest master

Steps To Reproduce

Not sure how. Just following meson install as usual.

Compilation error:

In file included from /home/user202729/miniforge3/envs/sage-dev/include/python3.11/Python.h:38,
                 from src/sage/calculus/interpolators.cpython-311-x86_64-linux-gnu.so.p/src/sage/calculus/interpolators.pyx.c:16:
src/sage/calculus/interpolators.cpython-311-x86_64-linux-gnu.so.p/src/sage/calculus/interpolators.pyx.c: In function '__pyx_f_5numpy_PyDataType_SHAPE':
src/sage/calculus/interpolators.cpython-311-x86_64-linux-gnu.so.p/src/sage/calculus/interpolators.pyx.c:3533:39: error: 'PyArray_Descr' {aka 'struct _PyArray_Descr'} has no member named 'subarray'
 3533 |     __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
      |                                       ^~

Looking at https://github.com/piskvorky/gensim/issues/3541 or https://github.com/TA-Lib/ta-lib-python/issues/655 looks like the cause is numpy 2.

numpy upgraded to version 2 at #38749

Looks like it's related to cython bug cython/cython#6249

cython version used:

  cython                         3.0.11          py311h55d416d_3      conda-forge

I already ran meson setup --reconfigure ./build/cp311, to no avail.

Config log

(using meson)

Package logs

packages installed by mamba env update -n sage-dev --file environment-3.11-linux.yml

Additional Information

No response

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions