-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python-numba: fix build with numpy 2.0.1 (3)
- Loading branch information
1 parent
6d817c7
commit 7fbc009
Showing
2 changed files
with
12 additions
and
10 deletions.
There are no files selected for viewing
18 changes: 10 additions & 8 deletions
18
mingw-w64-python-numba/001-fix-build-with-numpy-2.0.1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
--- a/numba/_helperlib.c | ||
+++ b/numba/_helperlib.c | ||
@@ -19,6 +19,7 @@ | ||
#else | ||
#include <stdint.h> | ||
#define _complex_float_t complex float | ||
+ #define I _Complex_I | ||
#define _complex_float_ctor(r, i) (r + I * i) | ||
#define _complex_double_t complex double | ||
#endif | ||
@@ -25,6 +25,9 @@ | ||
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION | ||
#include <numpy/ndarrayobject.h> | ||
#include <numpy/arrayscalars.h> | ||
+#if !defined(I) && !defined(_MSC_VER) | ||
+#define I _Complex_I | ||
+#endif | ||
|
||
#include "_arraystruct.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters