forked from numpy/numpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request numpy#24085 from lysnikolaou/real-imag-remove
ENH: Replace npy complex structs with native complex types
- Loading branch information
Showing
21 changed files
with
517 additions
and
408 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* This header is designed to be copy-pasted into downstream packages, since it provides | ||
a compatibility layer between the old C struct complex types and the new native C99 | ||
complex types. The new macros are in numpy/npy_math.h, which is why it is included here. */ | ||
#ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_2_COMPLEXCOMPAT_H_ | ||
#define NUMPY_CORE_INCLUDE_NUMPY_NPY_2_COMPLEXCOMPAT_H_ | ||
|
||
#include <numpy/npy_math.h> | ||
|
||
#ifndef NPY_CSETREALF | ||
#define NPY_CSETREALF(c, r) (c)->real = (r) | ||
#endif | ||
#ifndef NPY_CSETIMAGF | ||
#define NPY_CSETIMAGF(c, i) (c)->imag = (i) | ||
#endif | ||
#ifndef NPY_CSETREAL | ||
#define NPY_CSETREAL(c, r) (c)->real = (r) | ||
#endif | ||
#ifndef NPY_CSETIMAG | ||
#define NPY_CSETIMAG(c, i) (c)->imag = (i) | ||
#endif | ||
#ifndef NPY_CSETREALL | ||
#define NPY_CSETREALL(c, r) (c)->real = (r) | ||
#endif | ||
#ifndef NPY_CSETIMAGL | ||
#define NPY_CSETIMAGL(c, i) (c)->imag = (i) | ||
#endif | ||
|
||
#endif |
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
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
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
Oops, something went wrong.