Skip to content

setup: add NPY_NO_DEPRECATED_API and NPY_1_7_API_VERSION macros

Jörg Behrmann requested to merge behrmann/kwant:numpy17 into master

Cython 0.29.0 has been released recently and now allows to use the non-deprecated Numpy API by defining the appropriate macros.

So far it fails to build with

kwant/graph/core.c: In function ‘__pyx_f_5kwant_5graph_4core_5Graph__add_edges_ndarray_int64’:
kwant/graph/core.c:4133:29: error: ‘PyArrayObject’ {aka ‘struct tagPyArrayObject’} has no member named ‘dimensions’
   __pyx_t_1 = (__pyx_v_edges->dimensions[0]);
                             ^~
kwant/graph/core.c: In function ‘__pyx_f_5kwant_5graph_4core_5Graph__add_edges_ndarray_int32’:
kwant/graph/core.c:4253:29: error: ‘PyArrayObject’ {aka ‘struct tagPyArrayObject’} has no member named ‘dimensions’
   __pyx_t_1 = (__pyx_v_edges->dimensions[0]);

I'll keep you updated.

Merge request reports