Skip to content

Commit 78dc4c6

Browse files
committed
BUG: Fix headers for unviersal2 builds
1 parent fa397e9 commit 78dc4c6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

numpy/core/include/numpy/numpyconfig.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@
1919
#define NPY_SIZEOF_LONG 4
2020
#define NPY_SIZEOF_PY_INTPTR_T 4
2121
#endif
22+
23+
#undef NPY_SIZEOF_LONGDOUBLE
24+
#undef NPY_SIZEOF_COMPLEX_LONGDOUBLE
25+
26+
#ifdef __x86_64
27+
#define NPY_SIZEOF_LONGDOUBLE 16
28+
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
29+
#elif defined(__arm64__)
30+
#define NPY_SIZEOF_LONGDOUBLE 8
31+
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16
32+
#else
33+
#error "unknown architecture"
34+
#endif
2235
#endif
2336

2437
/**

0 commit comments

Comments
 (0)