|
132 | 132 | #warning "Requested NumPy target lower than supported NumPy 1.15."
|
133 | 133 | #endif
|
134 | 134 |
|
| 135 | +/* |
| 136 | + * We define a human readable translation to the Python version of NumPy |
| 137 | + * for error messages (and also to allow grepping the binaries for conda). |
| 138 | + */ |
| 139 | +#if NPY_FEATURE_VERSION == NPY_1_7_API_VERSION |
| 140 | + #define NPY_FEATURE_VERSION_STRING "1.7" |
| 141 | +#elif NPY_FEATURE_VERSION == NPY_1_8_API_VERSION |
| 142 | + #define NPY_FEATURE_VERSION_STRING "1.8" |
| 143 | +#elif NPY_FEATURE_VERSION == NPY_1_9_API_VERSION |
| 144 | + #define NPY_FEATURE_VERSION_STRING "1.9" |
| 145 | +#elif NPY_FEATURE_VERSION == NPY_1_10_API_VERSION /* also 1.11, 1.12 */ |
| 146 | + #define NPY_FEATURE_VERSION_STRING "1.10" |
| 147 | +#elif NPY_FEATURE_VERSION == NPY_1_13_API_VERSION |
| 148 | + #define NPY_FEATURE_VERSION_STRING "1.13" |
| 149 | +#elif NPY_FEATURE_VERSION == NPY_1_14_API_VERSION /* also 1.15 */ |
| 150 | + #define NPY_FEATURE_VERSION_STRING "1.14" |
| 151 | +#elif NPY_FEATURE_VERSION == NPY_1_16_API_VERSION /* also 1.17, 1.18, 1.19 */ |
| 152 | + #define NPY_FEATURE_VERSION_STRING "1.16" |
| 153 | +#elif NPY_FEATURE_VERSION == NPY_1_20_API_VERSION /* also 1.21 */ |
| 154 | + #define NPY_FEATURE_VERSION_STRING "1.20" |
| 155 | +#elif NPY_FEATURE_VERSION == NPY_1_22_API_VERSION |
| 156 | + #define NPY_FEATURE_VERSION_STRING "1.22" |
| 157 | +#elif NPY_FEATURE_VERSION == NPY_1_23_API_VERSION /* also 1.24 */ |
| 158 | + #define NPY_FEATURE_VERSION_STRING "1.23" |
| 159 | +#elif NPY_FEATURE_VERSION == NPY_1_25_API_VERSION |
| 160 | + #define NPY_FEATURE_VERSION_STRING "1.25" |
| 161 | +#elif NPY_FEATURE_VERSION == NPY_2_0_API_VERSION |
| 162 | + #define NPY_FEATURE_VERSION_STRING "2.0" |
| 163 | +#else |
| 164 | + #error "Missing version string define for new NumPy version." |
| 165 | +#endif |
| 166 | + |
135 | 167 |
|
136 | 168 | #endif /* NUMPY_CORE_INCLUDE_NUMPY_NPY_NUMPYCONFIG_H_ */
|
0 commit comments