Hi,
This is my first look at the numpy internals, so
I'm trying to help update pytensor to be compatible with numpy 2.0, and we have
some structs that inherit from npy_complex64 and npy_complex128, which
currently use .real and .imag to access real and imaginary parts.
Assuming a 64 bit syste
I can partially answer my own questions here:
1) To avoid figuring out the type underlying npy_complex64 etc, the following
macro seems to work:
#define set_real(X, Y) _Generic((X), \
npy_cfloat: npy_csetrealf, \
npy_cdouble: npy_csetreal, \
np