Open
Description
Describe the issue:
I am getting compiler errors when I upgrade from from gcc 14 to 15 (under Windows using the gcc compiler of MSYS2).
I don't understand the details, but according to ChatGpt:
When PyTensor generates its C++ extension code (mod.cpp), it includes NumPy headers with:
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
With GCC 15, deprecated functions in NumPy's C-API now raise hard errors, whereas GCC 14 would compile with a warning.
Reproducable code example:
import pytensor
from pytensor import tensor as pt
a = pt.dscalar()
b = pt.dscalar()
c = a + b
f = pytensor.function([a, b], c)
assert 4.0 == f(1.5, 2.5)
Error message:
segmentation fault (core dumped) python
PyTensor version information:
2.30.3
Context for the issue:
No response