diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2021-11-01 13:37:00 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-01 13:37:00 -0600 |
commit | ae453aa0efe13e70b080bc1363c2b90938a80534 (patch) | |
tree | da62be718063083986c378150ae7077e0bf4f54e | |
parent | 13e6c19338fac4129d3ec145c25f6fdad8f639d4 (diff) | |
parent | 78dc4c6ce7ea6429317e6ab36c936d60da6c1d2c (diff) | |
download | numpy-ae453aa0efe13e70b080bc1363c2b90938a80534.tar.gz |
Merge pull request #20270 from isuruf/headers
BUG: Fix headers for universal2 builds
-rw-r--r-- | numpy/core/include/numpy/numpyconfig.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/numpy/core/include/numpy/numpyconfig.h b/numpy/core/include/numpy/numpyconfig.h index b2ce66244..1c3686769 100644 --- a/numpy/core/include/numpy/numpyconfig.h +++ b/numpy/core/include/numpy/numpyconfig.h @@ -19,6 +19,19 @@ #define NPY_SIZEOF_LONG 4 #define NPY_SIZEOF_PY_INTPTR_T 4 #endif + + #undef NPY_SIZEOF_LONGDOUBLE + #undef NPY_SIZEOF_COMPLEX_LONGDOUBLE + + #ifdef __x86_64 + #define NPY_SIZEOF_LONGDOUBLE 16 + #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 + #elif defined(__arm64__) + #define NPY_SIZEOF_LONGDOUBLE 8 + #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16 + #else + #error "unknown architecture" + #endif #endif /** |