numpy 2.0.0
|
00001 #ifndef _NPY_COMMON_H_ 00002 #define _NPY_COMMON_H_ 00003 00004 /* numpconfig.h is auto-generated */ 00005 #include "numpyconfig.h" 00006 00007 #if defined(_MSC_VER) 00008 #define NPY_INLINE __inline 00009 #elif defined(__GNUC__) 00010 #if defined(__STRICT_ANSI__) 00011 #define NPY_INLINE __inline__ 00012 #else 00013 #define NPY_INLINE inline 00014 #endif 00015 #else 00016 #define NPY_INLINE 00017 #endif 00018 00019 /* enums for detected endianness */ 00020 enum { 00021 NPY_CPU_UNKNOWN_ENDIAN, 00022 NPY_CPU_LITTLE, 00023 NPY_CPU_BIG 00024 }; 00025 00026 /* 00027 * This is to typedef npy_intp to the appropriate pointer size for 00028 * this platform. Py_intptr_t, Py_uintptr_t are defined in pyport.h. 00029 */ 00030 typedef Py_intptr_t npy_intp; 00031 typedef Py_uintptr_t npy_uintp; 00032 #define NPY_SIZEOF_INTP NPY_SIZEOF_PY_INTPTR_T 00033 #define NPY_SIZEOF_UINTP NPY_SIZEOF_PY_INTPTR_T 00034 00035 #ifdef constchar 00036 #undef constchar 00037 #endif 00038 00039 #if (PY_VERSION_HEX < 0x02050000) 00040 #ifndef PY_SSIZE_T_MIN 00041 typedef int Py_ssize_t; 00042 #define PY_SSIZE_T_MAX INT_MAX 00043 #define PY_SSIZE_T_MIN INT_MIN 00044 #endif 00045 #define NPY_SSIZE_T_PYFMT "i" 00046 #undef PyIndex_Check 00047 #define constchar const char 00048 #define PyIndex_Check(op) 0 00049 #else 00050 #define NPY_SSIZE_T_PYFMT "n" 00051 #define constchar char 00052 #endif 00053 00054 /* NPY_INTP_FMT Note: 00055 * Unlike the other NPY_*_FMT macros which are used with 00056 * PyOS_snprintf, NPY_INTP_FMT is used with PyErr_Format and 00057 * PyString_Format. These functions use different formatting 00058 * codes which are portably specified according to the Python 00059 * documentation. See ticket #1795. 00060 * 00061 * On Windows x64, the LONGLONG formatter should be used, but 00062 * in Python 2.6 the %lld formatter is not supported. In this 00063 * case we work around the problem by using the %zd formatter. 00064 */ 00065 #if NPY_SIZEOF_PY_INTPTR_T == NPY_SIZEOF_INT 00066 #define NPY_INTP NPY_INT 00067 #define NPY_UINTP NPY_UINT 00068 #define PyIntpArrType_Type PyIntArrType_Type 00069 #define PyUIntpArrType_Type PyUIntArrType_Type 00070 #define NPY_MAX_INTP NPY_MAX_INT 00071 #define NPY_MIN_INTP NPY_MIN_INT 00072 #define NPY_MAX_UINTP NPY_MAX_UINT 00073 #define NPY_INTP_FMT "d" 00074 #elif NPY_SIZEOF_PY_INTPTR_T == NPY_SIZEOF_LONG 00075 #define NPY_INTP NPY_LONG 00076 #define NPY_UINTP NPY_ULONG 00077 #define PyIntpArrType_Type PyLongArrType_Type 00078 #define PyUIntpArrType_Type PyULongArrType_Type 00079 #define NPY_MAX_INTP NPY_MAX_LONG 00080 #define NPY_MIN_INTP MIN_LONG 00081 #define NPY_MAX_UINTP NPY_MAX_ULONG 00082 #define NPY_INTP_FMT "ld" 00083 #elif defined(PY_LONG_LONG) && (NPY_SIZEOF_PY_INTPTR_T == NPY_SIZEOF_LONGLONG) 00084 #define NPY_INTP NPY_LONGLONG 00085 #define NPY_UINTP NPY_ULONGLONG 00086 #define PyIntpArrType_Type PyLongLongArrType_Type 00087 #define PyUIntpArrType_Type PyULongLongArrType_Type 00088 #define NPY_MAX_INTP NPY_MAX_LONGLONG 00089 #define NPY_MIN_INTP NPY_MIN_LONGLONG 00090 #define NPY_MAX_UINTP NPY_MAX_ULONGLONG 00091 #if (PY_VERSION_HEX >= 0x02070000) 00092 #define NPY_INTP_FMT "lld" 00093 #else 00094 #define NPY_INTP_FMT "zd" 00095 #endif 00096 #endif 00097 00098 /* 00099 * We can only use C99 formats for npy_int_p if it is the same as 00100 * intp_t, hence the condition on HAVE_UNITPTR_T 00101 */ 00102 #if (NPY_USE_C99_FORMATS) == 1 \ 00103 && (defined HAVE_UINTPTR_T) \ 00104 && (defined HAVE_INTTYPES_H) 00105 #include <inttypes.h> 00106 #undef NPY_INTP_FMT 00107 #define NPY_INTP_FMT PRIdPTR 00108 #endif 00109 00110 00111 /* 00112 * Some platforms don't define bool, long long, or long double. 00113 * Handle that here. 00114 */ 00115 #define NPY_BYTE_FMT "hhd" 00116 #define NPY_UBYTE_FMT "hhu" 00117 #define NPY_SHORT_FMT "hd" 00118 #define NPY_USHORT_FMT "hu" 00119 #define NPY_INT_FMT "d" 00120 #define NPY_UINT_FMT "u" 00121 #define NPY_LONG_FMT "ld" 00122 #define NPY_ULONG_FMT "lu" 00123 #define NPY_HALF_FMT "g" 00124 #define NPY_FLOAT_FMT "g" 00125 #define NPY_DOUBLE_FMT "g" 00126 00127 00128 #ifdef PY_LONG_LONG 00129 typedef PY_LONG_LONG npy_longlong; 00130 typedef unsigned PY_LONG_LONG npy_ulonglong; 00131 # ifdef _MSC_VER 00132 # define NPY_LONGLONG_FMT "I64d" 00133 # define NPY_ULONGLONG_FMT "I64u" 00134 # elif defined(__APPLE__) || defined(__FreeBSD__) 00135 /* "%Ld" only parses 4 bytes -- "L" is floating modifier on MacOS X/BSD */ 00136 # define NPY_LONGLONG_FMT "lld" 00137 # define NPY_ULONGLONG_FMT "llu" 00138 /* 00139 another possible variant -- *quad_t works on *BSD, but is deprecated: 00140 #define LONGLONG_FMT "qd" 00141 #define ULONGLONG_FMT "qu" 00142 */ 00143 # else 00144 # define NPY_LONGLONG_FMT "Ld" 00145 # define NPY_ULONGLONG_FMT "Lu" 00146 # endif 00147 # ifdef _MSC_VER 00148 # define NPY_LONGLONG_SUFFIX(x) (x##i64) 00149 # define NPY_ULONGLONG_SUFFIX(x) (x##Ui64) 00150 # else 00151 # define NPY_LONGLONG_SUFFIX(x) (x##LL) 00152 # define NPY_ULONGLONG_SUFFIX(x) (x##ULL) 00153 # endif 00154 #else 00155 typedef long npy_longlong; 00156 typedef unsigned long npy_ulonglong; 00157 # define NPY_LONGLONG_SUFFIX(x) (x##L) 00158 # define NPY_ULONGLONG_SUFFIX(x) (x##UL) 00159 #endif 00160 00161 00162 typedef unsigned char npy_bool; 00163 #define NPY_FALSE 0 00164 #define NPY_TRUE 1 00165 00166 00167 #if NPY_SIZEOF_LONGDOUBLE == NPY_SIZEOF_DOUBLE 00168 typedef double npy_longdouble; 00169 #define NPY_LONGDOUBLE_FMT "g" 00170 #else 00171 typedef long double npy_longdouble; 00172 #define NPY_LONGDOUBLE_FMT "Lg" 00173 #endif 00174 00175 #ifndef Py_USING_UNICODE 00176 #error Must use Python with unicode enabled. 00177 #endif 00178 00179 00180 typedef signed char npy_byte; 00181 typedef unsigned char npy_ubyte; 00182 typedef unsigned short npy_ushort; 00183 typedef unsigned int npy_uint; 00184 typedef unsigned long npy_ulong; 00185 00186 /* These are for completeness */ 00187 typedef char npy_char; 00188 typedef short npy_short; 00189 typedef int npy_int; 00190 typedef long npy_long; 00191 typedef float npy_float; 00192 typedef double npy_double; 00193 00194 /* 00195 * Disabling C99 complex usage: a lot of C code in numpy/scipy rely on being 00196 * able to do .real/.imag. Will have to convert code first. 00197 */ 00198 #if 0 00199 #if defined(NPY_USE_C99_COMPLEX) && defined(NPY_HAVE_COMPLEX_DOUBLE) 00200 typedef complex npy_cdouble; 00201 #else 00202 typedef struct { double real, imag; } npy_cdouble; 00203 #endif 00204 00205 #if defined(NPY_USE_C99_COMPLEX) && defined(NPY_HAVE_COMPLEX_FLOAT) 00206 typedef complex float npy_cfloat; 00207 #else 00208 typedef struct { float real, imag; } npy_cfloat; 00209 #endif 00210 00211 #if defined(NPY_USE_C99_COMPLEX) && defined(NPY_HAVE_COMPLEX_LONG_DOUBLE) 00212 typedef complex long double npy_clongdouble; 00213 #else 00214 typedef struct {npy_longdouble real, imag;} npy_clongdouble; 00215 #endif 00216 #endif 00217 #if NPY_SIZEOF_COMPLEX_DOUBLE != 2 * NPY_SIZEOF_DOUBLE 00218 #error npy_cdouble definition is not compatible with C99 complex definition ! \ 00219 Please contact Numpy maintainers and give detailed information about your \ 00220 compiler and platform 00221 #endif 00222 typedef struct { double real, imag; } npy_cdouble; 00223 00224 #if NPY_SIZEOF_COMPLEX_FLOAT != 2 * NPY_SIZEOF_FLOAT 00225 #error npy_cfloat definition is not compatible with C99 complex definition ! \ 00226 Please contact Numpy maintainers and give detailed information about your \ 00227 compiler and platform 00228 #endif 00229 typedef struct { float real, imag; } npy_cfloat; 00230 00231 #if NPY_SIZEOF_COMPLEX_LONGDOUBLE != 2 * NPY_SIZEOF_LONGDOUBLE 00232 #error npy_clongdouble definition is not compatible with C99 complex definition ! \ 00233 Please contact Numpy maintainers and give detailed information about your \ 00234 compiler and platform 00235 #endif 00236 typedef struct { npy_longdouble real, imag; } npy_clongdouble; 00237 00238 /* 00239 * numarray-style bit-width typedefs 00240 */ 00241 #define NPY_MAX_INT8 127 00242 #define NPY_MIN_INT8 -128 00243 #define NPY_MAX_UINT8 255 00244 #define NPY_MAX_INT16 32767 00245 #define NPY_MIN_INT16 -32768 00246 #define NPY_MAX_UINT16 65535 00247 #define NPY_MAX_INT32 2147483647 00248 #define NPY_MIN_INT32 (-NPY_MAX_INT32 - 1) 00249 #define NPY_MAX_UINT32 4294967295U 00250 #define NPY_MAX_INT64 NPY_LONGLONG_SUFFIX(9223372036854775807) 00251 #define NPY_MIN_INT64 (-NPY_MAX_INT64 - NPY_LONGLONG_SUFFIX(1)) 00252 #define NPY_MAX_UINT64 NPY_ULONGLONG_SUFFIX(18446744073709551615) 00253 #define NPY_MAX_INT128 NPY_LONGLONG_SUFFIX(85070591730234615865843651857942052864) 00254 #define NPY_MIN_INT128 (-NPY_MAX_INT128 - NPY_LONGLONG_SUFFIX(1)) 00255 #define NPY_MAX_UINT128 NPY_ULONGLONG_SUFFIX(170141183460469231731687303715884105728) 00256 #define NPY_MAX_INT256 NPY_LONGLONG_SUFFIX(57896044618658097711785492504343953926634992332820282019728792003956564819967) 00257 #define NPY_MIN_INT256 (-NPY_MAX_INT256 - NPY_LONGLONG_SUFFIX(1)) 00258 #define NPY_MAX_UINT256 NPY_ULONGLONG_SUFFIX(115792089237316195423570985008687907853269984665640564039457584007913129639935) 00259 #define NPY_MIN_DATETIME NPY_MIN_INT64 00260 #define NPY_MAX_DATETIME NPY_MAX_INT64 00261 #define NPY_MIN_TIMEDELTA NPY_MIN_INT64 00262 #define NPY_MAX_TIMEDELTA NPY_MAX_INT64 00263 00264 /* Need to find the number of bits for each type and 00265 make definitions accordingly. 00266 00267 C states that sizeof(char) == 1 by definition 00268 00269 So, just using the sizeof keyword won't help. 00270 00271 It also looks like Python itself uses sizeof(char) quite a 00272 bit, which by definition should be 1 all the time. 00273 00274 Idea: Make Use of CHAR_BIT which should tell us how many 00275 BITS per CHARACTER 00276 */ 00277 00278 /* Include platform definitions -- These are in the C89/90 standard */ 00279 #include <limits.h> 00280 #define NPY_MAX_BYTE SCHAR_MAX 00281 #define NPY_MIN_BYTE SCHAR_MIN 00282 #define NPY_MAX_UBYTE UCHAR_MAX 00283 #define NPY_MAX_SHORT SHRT_MAX 00284 #define NPY_MIN_SHORT SHRT_MIN 00285 #define NPY_MAX_USHORT USHRT_MAX 00286 #define NPY_MAX_INT INT_MAX 00287 #ifndef INT_MIN 00288 #define INT_MIN (-INT_MAX - 1) 00289 #endif 00290 #define NPY_MIN_INT INT_MIN 00291 #define NPY_MAX_UINT UINT_MAX 00292 #define NPY_MAX_LONG LONG_MAX 00293 #define NPY_MIN_LONG LONG_MIN 00294 #define NPY_MAX_ULONG ULONG_MAX 00295 00296 #define NPY_SIZEOF_HALF 2 00297 #define NPY_SIZEOF_DATETIME 8 00298 #define NPY_SIZEOF_TIMEDELTA 8 00299 00300 #define NPY_BITSOF_BOOL (sizeof(npy_bool)*CHAR_BIT) 00301 #define NPY_BITSOF_CHAR CHAR_BIT 00302 #define NPY_BITSOF_SHORT (NPY_SIZEOF_SHORT * CHAR_BIT) 00303 #define NPY_BITSOF_INT (NPY_SIZEOF_INT * CHAR_BIT) 00304 #define NPY_BITSOF_LONG (NPY_SIZEOF_LONG * CHAR_BIT) 00305 #define NPY_BITSOF_LONGLONG (NPY_SIZEOF_LONGLONG * CHAR_BIT) 00306 #define NPY_BITSOF_HALF (NPY_SIZEOF_HALF * CHAR_BIT) 00307 #define NPY_BITSOF_FLOAT (NPY_SIZEOF_FLOAT * CHAR_BIT) 00308 #define NPY_BITSOF_DOUBLE (NPY_SIZEOF_DOUBLE * CHAR_BIT) 00309 #define NPY_BITSOF_LONGDOUBLE (NPY_SIZEOF_LONGDOUBLE * CHAR_BIT) 00310 #define NPY_BITSOF_DATETIME (NPY_SIZEOF_DATETIME * CHAR_BIT) 00311 #define NPY_BITSOF_TIMEDELTA (NPY_SIZEOF_TIMEDELTA * CHAR_BIT) 00312 00313 #if NPY_BITSOF_LONG == 8 00314 #define NPY_INT8 NPY_LONG 00315 #define NPY_UINT8 NPY_ULONG 00316 typedef long npy_int8; 00317 typedef unsigned long npy_uint8; 00318 #define PyInt8ScalarObject PyLongScalarObject 00319 #define PyInt8ArrType_Type PyLongArrType_Type 00320 #define PyUInt8ScalarObject PyULongScalarObject 00321 #define PyUInt8ArrType_Type PyULongArrType_Type 00322 #define NPY_INT8_FMT NPY_LONG_FMT 00323 #define NPY_UINT8_FMT NPY_ULONG_FMT 00324 #elif NPY_BITSOF_LONG == 16 00325 #define NPY_INT16 NPY_LONG 00326 #define NPY_UINT16 NPY_ULONG 00327 typedef long npy_int16; 00328 typedef unsigned long npy_uint16; 00329 #define PyInt16ScalarObject PyLongScalarObject 00330 #define PyInt16ArrType_Type PyLongArrType_Type 00331 #define PyUInt16ScalarObject PyULongScalarObject 00332 #define PyUInt16ArrType_Type PyULongArrType_Type 00333 #define NPY_INT16_FMT NPY_LONG_FMT 00334 #define NPY_UINT16_FMT NPY_ULONG_FMT 00335 #elif NPY_BITSOF_LONG == 32 00336 #define NPY_INT32 NPY_LONG 00337 #define NPY_UINT32 NPY_ULONG 00338 typedef long npy_int32; 00339 typedef unsigned long npy_uint32; 00340 typedef unsigned long npy_ucs4; 00341 #define PyInt32ScalarObject PyLongScalarObject 00342 #define PyInt32ArrType_Type PyLongArrType_Type 00343 #define PyUInt32ScalarObject PyULongScalarObject 00344 #define PyUInt32ArrType_Type PyULongArrType_Type 00345 #define NPY_INT32_FMT NPY_LONG_FMT 00346 #define NPY_UINT32_FMT NPY_ULONG_FMT 00347 #elif NPY_BITSOF_LONG == 64 00348 #define NPY_INT64 NPY_LONG 00349 #define NPY_UINT64 NPY_ULONG 00350 typedef long npy_int64; 00351 typedef unsigned long npy_uint64; 00352 #define PyInt64ScalarObject PyLongScalarObject 00353 #define PyInt64ArrType_Type PyLongArrType_Type 00354 #define PyUInt64ScalarObject PyULongScalarObject 00355 #define PyUInt64ArrType_Type PyULongArrType_Type 00356 #define NPY_INT64_FMT NPY_LONG_FMT 00357 #define NPY_UINT64_FMT NPY_ULONG_FMT 00358 #define MyPyLong_FromInt64 PyLong_FromLong 00359 #define MyPyLong_AsInt64 PyLong_AsLong 00360 #elif NPY_BITSOF_LONG == 128 00361 #define NPY_INT128 NPY_LONG 00362 #define NPY_UINT128 NPY_ULONG 00363 typedef long npy_int128; 00364 typedef unsigned long npy_uint128; 00365 #define PyInt128ScalarObject PyLongScalarObject 00366 #define PyInt128ArrType_Type PyLongArrType_Type 00367 #define PyUInt128ScalarObject PyULongScalarObject 00368 #define PyUInt128ArrType_Type PyULongArrType_Type 00369 #define NPY_INT128_FMT NPY_LONG_FMT 00370 #define NPY_UINT128_FMT NPY_ULONG_FMT 00371 #endif 00372 00373 #if NPY_BITSOF_LONGLONG == 8 00374 # ifndef NPY_INT8 00375 # define NPY_INT8 NPY_LONGLONG 00376 # define NPY_UINT8 NPY_ULONGLONG 00377 typedef npy_longlong npy_int8; 00378 typedef npy_ulonglong npy_uint8; 00379 # define PyInt8ScalarObject PyLongLongScalarObject 00380 # define PyInt8ArrType_Type PyLongLongArrType_Type 00381 # define PyUInt8ScalarObject PyULongLongScalarObject 00382 # define PyUInt8ArrType_Type PyULongLongArrType_Type 00383 #define NPY_INT8_FMT NPY_LONGLONG_FMT 00384 #define NPY_UINT8_FMT NPY_ULONGLONG_FMT 00385 # endif 00386 # define NPY_MAX_LONGLONG NPY_MAX_INT8 00387 # define NPY_MIN_LONGLONG NPY_MIN_INT8 00388 # define NPY_MAX_ULONGLONG NPY_MAX_UINT8 00389 #elif NPY_BITSOF_LONGLONG == 16 00390 # ifndef NPY_INT16 00391 # define NPY_INT16 NPY_LONGLONG 00392 # define NPY_UINT16 NPY_ULONGLONG 00393 typedef npy_longlong npy_int16; 00394 typedef npy_ulonglong npy_uint16; 00395 # define PyInt16ScalarObject PyLongLongScalarObject 00396 # define PyInt16ArrType_Type PyLongLongArrType_Type 00397 # define PyUInt16ScalarObject PyULongLongScalarObject 00398 # define PyUInt16ArrType_Type PyULongLongArrType_Type 00399 #define NPY_INT16_FMT NPY_LONGLONG_FMT 00400 #define NPY_UINT16_FMT NPY_ULONGLONG_FMT 00401 # endif 00402 # define NPY_MAX_LONGLONG NPY_MAX_INT16 00403 # define NPY_MIN_LONGLONG NPY_MIN_INT16 00404 # define NPY_MAX_ULONGLONG NPY_MAX_UINT16 00405 #elif NPY_BITSOF_LONGLONG == 32 00406 # ifndef NPY_INT32 00407 # define NPY_INT32 NPY_LONGLONG 00408 # define NPY_UINT32 NPY_ULONGLONG 00409 typedef npy_longlong npy_int32; 00410 typedef npy_ulonglong npy_uint32; 00411 typedef npy_ulonglong npy_ucs4; 00412 # define PyInt32ScalarObject PyLongLongScalarObject 00413 # define PyInt32ArrType_Type PyLongLongArrType_Type 00414 # define PyUInt32ScalarObject PyULongLongScalarObject 00415 # define PyUInt32ArrType_Type PyULongLongArrType_Type 00416 #define NPY_INT32_FMT NPY_LONGLONG_FMT 00417 #define NPY_UINT32_FMT NPY_ULONGLONG_FMT 00418 # endif 00419 # define NPY_MAX_LONGLONG NPY_MAX_INT32 00420 # define NPY_MIN_LONGLONG NPY_MIN_INT32 00421 # define NPY_MAX_ULONGLONG NPY_MAX_UINT32 00422 #elif NPY_BITSOF_LONGLONG == 64 00423 # ifndef NPY_INT64 00424 # define NPY_INT64 NPY_LONGLONG 00425 # define NPY_UINT64 NPY_ULONGLONG 00426 typedef npy_longlong npy_int64; 00427 typedef npy_ulonglong npy_uint64; 00428 # define PyInt64ScalarObject PyLongLongScalarObject 00429 # define PyInt64ArrType_Type PyLongLongArrType_Type 00430 # define PyUInt64ScalarObject PyULongLongScalarObject 00431 # define PyUInt64ArrType_Type PyULongLongArrType_Type 00432 #define NPY_INT64_FMT NPY_LONGLONG_FMT 00433 #define NPY_UINT64_FMT NPY_ULONGLONG_FMT 00434 # define MyPyLong_FromInt64 PyLong_FromLongLong 00435 # define MyPyLong_AsInt64 PyLong_AsLongLong 00436 # endif 00437 # define NPY_MAX_LONGLONG NPY_MAX_INT64 00438 # define NPY_MIN_LONGLONG NPY_MIN_INT64 00439 # define NPY_MAX_ULONGLONG NPY_MAX_UINT64 00440 #elif NPY_BITSOF_LONGLONG == 128 00441 # ifndef NPY_INT128 00442 # define NPY_INT128 NPY_LONGLONG 00443 # define NPY_UINT128 NPY_ULONGLONG 00444 typedef npy_longlong npy_int128; 00445 typedef npy_ulonglong npy_uint128; 00446 # define PyInt128ScalarObject PyLongLongScalarObject 00447 # define PyInt128ArrType_Type PyLongLongArrType_Type 00448 # define PyUInt128ScalarObject PyULongLongScalarObject 00449 # define PyUInt128ArrType_Type PyULongLongArrType_Type 00450 #define NPY_INT128_FMT NPY_LONGLONG_FMT 00451 #define NPY_UINT128_FMT NPY_ULONGLONG_FMT 00452 # endif 00453 # define NPY_MAX_LONGLONG NPY_MAX_INT128 00454 # define NPY_MIN_LONGLONG NPY_MIN_INT128 00455 # define NPY_MAX_ULONGLONG NPY_MAX_UINT128 00456 #elif NPY_BITSOF_LONGLONG == 256 00457 # define NPY_INT256 NPY_LONGLONG 00458 # define NPY_UINT256 NPY_ULONGLONG 00459 typedef npy_longlong npy_int256; 00460 typedef npy_ulonglong npy_uint256; 00461 # define PyInt256ScalarObject PyLongLongScalarObject 00462 # define PyInt256ArrType_Type PyLongLongArrType_Type 00463 # define PyUInt256ScalarObject PyULongLongScalarObject 00464 # define PyUInt256ArrType_Type PyULongLongArrType_Type 00465 #define NPY_INT256_FMT NPY_LONGLONG_FMT 00466 #define NPY_UINT256_FMT NPY_ULONGLONG_FMT 00467 # define NPY_MAX_LONGLONG NPY_MAX_INT256 00468 # define NPY_MIN_LONGLONG NPY_MIN_INT256 00469 # define NPY_MAX_ULONGLONG NPY_MAX_UINT256 00470 #endif 00471 00472 #if NPY_BITSOF_INT == 8 00473 #ifndef NPY_INT8 00474 #define NPY_INT8 NPY_INT 00475 #define NPY_UINT8 NPY_UINT 00476 typedef int npy_int8; 00477 typedef unsigned int npy_uint8; 00478 # define PyInt8ScalarObject PyIntScalarObject 00479 # define PyInt8ArrType_Type PyIntArrType_Type 00480 # define PyUInt8ScalarObject PyUIntScalarObject 00481 # define PyUInt8ArrType_Type PyUIntArrType_Type 00482 #define NPY_INT8_FMT NPY_INT_FMT 00483 #define NPY_UINT8_FMT NPY_UINT_FMT 00484 #endif 00485 #elif NPY_BITSOF_INT == 16 00486 #ifndef NPY_INT16 00487 #define NPY_INT16 NPY_INT 00488 #define NPY_UINT16 NPY_UINT 00489 typedef int npy_int16; 00490 typedef unsigned int npy_uint16; 00491 # define PyInt16ScalarObject PyIntScalarObject 00492 # define PyInt16ArrType_Type PyIntArrType_Type 00493 # define PyUInt16ScalarObject PyIntUScalarObject 00494 # define PyUInt16ArrType_Type PyIntUArrType_Type 00495 #define NPY_INT16_FMT NPY_INT_FMT 00496 #define NPY_UINT16_FMT NPY_UINT_FMT 00497 #endif 00498 #elif NPY_BITSOF_INT == 32 00499 #ifndef NPY_INT32 00500 #define NPY_INT32 NPY_INT 00501 #define NPY_UINT32 NPY_UINT 00502 typedef int npy_int32; 00503 typedef unsigned int npy_uint32; 00504 typedef unsigned int npy_ucs4; 00505 # define PyInt32ScalarObject PyIntScalarObject 00506 # define PyInt32ArrType_Type PyIntArrType_Type 00507 # define PyUInt32ScalarObject PyUIntScalarObject 00508 # define PyUInt32ArrType_Type PyUIntArrType_Type 00509 #define NPY_INT32_FMT NPY_INT_FMT 00510 #define NPY_UINT32_FMT NPY_UINT_FMT 00511 #endif 00512 #elif NPY_BITSOF_INT == 64 00513 #ifndef NPY_INT64 00514 #define NPY_INT64 NPY_INT 00515 #define NPY_UINT64 NPY_UINT 00516 typedef int npy_int64; 00517 typedef unsigned int npy_uint64; 00518 # define PyInt64ScalarObject PyIntScalarObject 00519 # define PyInt64ArrType_Type PyIntArrType_Type 00520 # define PyUInt64ScalarObject PyUIntScalarObject 00521 # define PyUInt64ArrType_Type PyUIntArrType_Type 00522 #define NPY_INT64_FMT NPY_INT_FMT 00523 #define NPY_UINT64_FMT NPY_UINT_FMT 00524 # define MyPyLong_FromInt64 PyLong_FromLong 00525 # define MyPyLong_AsInt64 PyLong_AsLong 00526 #endif 00527 #elif NPY_BITSOF_INT == 128 00528 #ifndef NPY_INT128 00529 #define NPY_INT128 NPY_INT 00530 #define NPY_UINT128 NPY_UINT 00531 typedef int npy_int128; 00532 typedef unsigned int npy_uint128; 00533 # define PyInt128ScalarObject PyIntScalarObject 00534 # define PyInt128ArrType_Type PyIntArrType_Type 00535 # define PyUInt128ScalarObject PyUIntScalarObject 00536 # define PyUInt128ArrType_Type PyUIntArrType_Type 00537 #define NPY_INT128_FMT NPY_INT_FMT 00538 #define NPY_UINT128_FMT NPY_UINT_FMT 00539 #endif 00540 #endif 00541 00542 #if NPY_BITSOF_SHORT == 8 00543 #ifndef NPY_INT8 00544 #define NPY_INT8 NPY_SHORT 00545 #define NPY_UINT8 NPY_USHORT 00546 typedef short npy_int8; 00547 typedef unsigned short npy_uint8; 00548 # define PyInt8ScalarObject PyShortScalarObject 00549 # define PyInt8ArrType_Type PyShortArrType_Type 00550 # define PyUInt8ScalarObject PyUShortScalarObject 00551 # define PyUInt8ArrType_Type PyUShortArrType_Type 00552 #define NPY_INT8_FMT NPY_SHORT_FMT 00553 #define NPY_UINT8_FMT NPY_USHORT_FMT 00554 #endif 00555 #elif NPY_BITSOF_SHORT == 16 00556 #ifndef NPY_INT16 00557 #define NPY_INT16 NPY_SHORT 00558 #define NPY_UINT16 NPY_USHORT 00559 typedef short npy_int16; 00560 typedef unsigned short npy_uint16; 00561 # define PyInt16ScalarObject PyShortScalarObject 00562 # define PyInt16ArrType_Type PyShortArrType_Type 00563 # define PyUInt16ScalarObject PyUShortScalarObject 00564 # define PyUInt16ArrType_Type PyUShortArrType_Type 00565 #define NPY_INT16_FMT NPY_SHORT_FMT 00566 #define NPY_UINT16_FMT NPY_USHORT_FMT 00567 #endif 00568 #elif NPY_BITSOF_SHORT == 32 00569 #ifndef NPY_INT32 00570 #define NPY_INT32 NPY_SHORT 00571 #define NPY_UINT32 NPY_USHORT 00572 typedef short npy_int32; 00573 typedef unsigned short npy_uint32; 00574 typedef unsigned short npy_ucs4; 00575 # define PyInt32ScalarObject PyShortScalarObject 00576 # define PyInt32ArrType_Type PyShortArrType_Type 00577 # define PyUInt32ScalarObject PyUShortScalarObject 00578 # define PyUInt32ArrType_Type PyUShortArrType_Type 00579 #define NPY_INT32_FMT NPY_SHORT_FMT 00580 #define NPY_UINT32_FMT NPY_USHORT_FMT 00581 #endif 00582 #elif NPY_BITSOF_SHORT == 64 00583 #ifndef NPY_INT64 00584 #define NPY_INT64 NPY_SHORT 00585 #define NPY_UINT64 NPY_USHORT 00586 typedef short npy_int64; 00587 typedef unsigned short npy_uint64; 00588 # define PyInt64ScalarObject PyShortScalarObject 00589 # define PyInt64ArrType_Type PyShortArrType_Type 00590 # define PyUInt64ScalarObject PyUShortScalarObject 00591 # define PyUInt64ArrType_Type PyUShortArrType_Type 00592 #define NPY_INT64_FMT NPY_SHORT_FMT 00593 #define NPY_UINT64_FMT NPY_USHORT_FMT 00594 # define MyPyLong_FromInt64 PyLong_FromLong 00595 # define MyPyLong_AsInt64 PyLong_AsLong 00596 #endif 00597 #elif NPY_BITSOF_SHORT == 128 00598 #ifndef NPY_INT128 00599 #define NPY_INT128 NPY_SHORT 00600 #define NPY_UINT128 NPY_USHORT 00601 typedef short npy_int128; 00602 typedef unsigned short npy_uint128; 00603 # define PyInt128ScalarObject PyShortScalarObject 00604 # define PyInt128ArrType_Type PyShortArrType_Type 00605 # define PyUInt128ScalarObject PyUShortScalarObject 00606 # define PyUInt128ArrType_Type PyUShortArrType_Type 00607 #define NPY_INT128_FMT NPY_SHORT_FMT 00608 #define NPY_UINT128_FMT NPY_USHORT_FMT 00609 #endif 00610 #endif 00611 00612 00613 #if NPY_BITSOF_CHAR == 8 00614 #ifndef NPY_INT8 00615 #define NPY_INT8 NPY_BYTE 00616 #define NPY_UINT8 NPY_UBYTE 00617 typedef signed char npy_int8; 00618 typedef unsigned char npy_uint8; 00619 # define PyInt8ScalarObject PyByteScalarObject 00620 # define PyInt8ArrType_Type PyByteArrType_Type 00621 # define PyUInt8ScalarObject PyUByteScalarObject 00622 # define PyUInt8ArrType_Type PyUByteArrType_Type 00623 #define NPY_INT8_FMT NPY_BYTE_FMT 00624 #define NPY_UINT8_FMT NPY_UBYTE_FMT 00625 #endif 00626 #elif NPY_BITSOF_CHAR == 16 00627 #ifndef NPY_INT16 00628 #define NPY_INT16 NPY_BYTE 00629 #define NPY_UINT16 NPY_UBYTE 00630 typedef signed char npy_int16; 00631 typedef unsigned char npy_uint16; 00632 # define PyInt16ScalarObject PyByteScalarObject 00633 # define PyInt16ArrType_Type PyByteArrType_Type 00634 # define PyUInt16ScalarObject PyUByteScalarObject 00635 # define PyUInt16ArrType_Type PyUByteArrType_Type 00636 #define NPY_INT16_FMT NPY_BYTE_FMT 00637 #define NPY_UINT16_FMT NPY_UBYTE_FMT 00638 #endif 00639 #elif NPY_BITSOF_CHAR == 32 00640 #ifndef NPY_INT32 00641 #define NPY_INT32 NPY_BYTE 00642 #define NPY_UINT32 NPY_UBYTE 00643 typedef signed char npy_int32; 00644 typedef unsigned char npy_uint32; 00645 typedef unsigned char npy_ucs4; 00646 # define PyInt32ScalarObject PyByteScalarObject 00647 # define PyInt32ArrType_Type PyByteArrType_Type 00648 # define PyUInt32ScalarObject PyUByteScalarObject 00649 # define PyUInt32ArrType_Type PyUByteArrType_Type 00650 #define NPY_INT32_FMT NPY_BYTE_FMT 00651 #define NPY_UINT32_FMT NPY_UBYTE_FMT 00652 #endif 00653 #elif NPY_BITSOF_CHAR == 64 00654 #ifndef NPY_INT64 00655 #define NPY_INT64 NPY_BYTE 00656 #define NPY_UINT64 NPY_UBYTE 00657 typedef signed char npy_int64; 00658 typedef unsigned char npy_uint64; 00659 # define PyInt64ScalarObject PyByteScalarObject 00660 # define PyInt64ArrType_Type PyByteArrType_Type 00661 # define PyUInt64ScalarObject PyUByteScalarObject 00662 # define PyUInt64ArrType_Type PyUByteArrType_Type 00663 #define NPY_INT64_FMT NPY_BYTE_FMT 00664 #define NPY_UINT64_FMT NPY_UBYTE_FMT 00665 # define MyPyLong_FromInt64 PyLong_FromLong 00666 # define MyPyLong_AsInt64 PyLong_AsLong 00667 #endif 00668 #elif NPY_BITSOF_CHAR == 128 00669 #ifndef NPY_INT128 00670 #define NPY_INT128 NPY_BYTE 00671 #define NPY_UINT128 NPY_UBYTE 00672 typedef signed char npy_int128; 00673 typedef unsigned char npy_uint128; 00674 # define PyInt128ScalarObject PyByteScalarObject 00675 # define PyInt128ArrType_Type PyByteArrType_Type 00676 # define PyUInt128ScalarObject PyUByteScalarObject 00677 # define PyUInt128ArrType_Type PyUByteArrType_Type 00678 #define NPY_INT128_FMT NPY_BYTE_FMT 00679 #define NPY_UINT128_FMT NPY_UBYTE_FMT 00680 #endif 00681 #endif 00682 00683 00684 00685 #if NPY_BITSOF_DOUBLE == 32 00686 #ifndef NPY_FLOAT32 00687 #define NPY_FLOAT32 NPY_DOUBLE 00688 #define NPY_COMPLEX64 NPY_CDOUBLE 00689 typedef double npy_float32; 00690 typedef npy_cdouble npy_complex64; 00691 # define PyFloat32ScalarObject PyDoubleScalarObject 00692 # define PyComplex64ScalarObject PyCDoubleScalarObject 00693 # define PyFloat32ArrType_Type PyDoubleArrType_Type 00694 # define PyComplex64ArrType_Type PyCDoubleArrType_Type 00695 #define NPY_FLOAT32_FMT NPY_DOUBLE_FMT 00696 #define NPY_COMPLEX64_FMT NPY_CDOUBLE_FMT 00697 #endif 00698 #elif NPY_BITSOF_DOUBLE == 64 00699 #ifndef NPY_FLOAT64 00700 #define NPY_FLOAT64 NPY_DOUBLE 00701 #define NPY_COMPLEX128 NPY_CDOUBLE 00702 typedef double npy_float64; 00703 typedef npy_cdouble npy_complex128; 00704 # define PyFloat64ScalarObject PyDoubleScalarObject 00705 # define PyComplex128ScalarObject PyCDoubleScalarObject 00706 # define PyFloat64ArrType_Type PyDoubleArrType_Type 00707 # define PyComplex128ArrType_Type PyCDoubleArrType_Type 00708 #define NPY_FLOAT64_FMT NPY_DOUBLE_FMT 00709 #define NPY_COMPLEX128_FMT NPY_CDOUBLE_FMT 00710 #endif 00711 #elif NPY_BITSOF_DOUBLE == 80 00712 #ifndef NPY_FLOAT80 00713 #define NPY_FLOAT80 NPY_DOUBLE 00714 #define NPY_COMPLEX160 NPY_CDOUBLE 00715 typedef double npy_float80; 00716 typedef npy_cdouble npy_complex160; 00717 # define PyFloat80ScalarObject PyDoubleScalarObject 00718 # define PyComplex160ScalarObject PyCDoubleScalarObject 00719 # define PyFloat80ArrType_Type PyDoubleArrType_Type 00720 # define PyComplex160ArrType_Type PyCDoubleArrType_Type 00721 #define NPY_FLOAT80_FMT NPY_DOUBLE_FMT 00722 #define NPY_COMPLEX160_FMT NPY_CDOUBLE_FMT 00723 #endif 00724 #elif NPY_BITSOF_DOUBLE == 96 00725 #ifndef NPY_FLOAT96 00726 #define NPY_FLOAT96 NPY_DOUBLE 00727 #define NPY_COMPLEX192 NPY_CDOUBLE 00728 typedef double npy_float96; 00729 typedef npy_cdouble npy_complex192; 00730 # define PyFloat96ScalarObject PyDoubleScalarObject 00731 # define PyComplex192ScalarObject PyCDoubleScalarObject 00732 # define PyFloat96ArrType_Type PyDoubleArrType_Type 00733 # define PyComplex192ArrType_Type PyCDoubleArrType_Type 00734 #define NPY_FLOAT96_FMT NPY_DOUBLE_FMT 00735 #define NPY_COMPLEX192_FMT NPY_CDOUBLE_FMT 00736 #endif 00737 #elif NPY_BITSOF_DOUBLE == 128 00738 #ifndef NPY_FLOAT128 00739 #define NPY_FLOAT128 NPY_DOUBLE 00740 #define NPY_COMPLEX256 NPY_CDOUBLE 00741 typedef double npy_float128; 00742 typedef npy_cdouble npy_complex256; 00743 # define PyFloat128ScalarObject PyDoubleScalarObject 00744 # define PyComplex256ScalarObject PyCDoubleScalarObject 00745 # define PyFloat128ArrType_Type PyDoubleArrType_Type 00746 # define PyComplex256ArrType_Type PyCDoubleArrType_Type 00747 #define NPY_FLOAT128_FMT NPY_DOUBLE_FMT 00748 #define NPY_COMPLEX256_FMT NPY_CDOUBLE_FMT 00749 #endif 00750 #endif 00751 00752 00753 00754 #if NPY_BITSOF_FLOAT == 32 00755 #ifndef NPY_FLOAT32 00756 #define NPY_FLOAT32 NPY_FLOAT 00757 #define NPY_COMPLEX64 NPY_CFLOAT 00758 typedef float npy_float32; 00759 typedef npy_cfloat npy_complex64; 00760 # define PyFloat32ScalarObject PyFloatScalarObject 00761 # define PyComplex64ScalarObject PyCFloatScalarObject 00762 # define PyFloat32ArrType_Type PyFloatArrType_Type 00763 # define PyComplex64ArrType_Type PyCFloatArrType_Type 00764 #define NPY_FLOAT32_FMT NPY_FLOAT_FMT 00765 #define NPY_COMPLEX64_FMT NPY_CFLOAT_FMT 00766 #endif 00767 #elif NPY_BITSOF_FLOAT == 64 00768 #ifndef NPY_FLOAT64 00769 #define NPY_FLOAT64 NPY_FLOAT 00770 #define NPY_COMPLEX128 NPY_CFLOAT 00771 typedef float npy_float64; 00772 typedef npy_cfloat npy_complex128; 00773 # define PyFloat64ScalarObject PyFloatScalarObject 00774 # define PyComplex128ScalarObject PyCFloatScalarObject 00775 # define PyFloat64ArrType_Type PyFloatArrType_Type 00776 # define PyComplex128ArrType_Type PyCFloatArrType_Type 00777 #define NPY_FLOAT64_FMT NPY_FLOAT_FMT 00778 #define NPY_COMPLEX128_FMT NPY_CFLOAT_FMT 00779 #endif 00780 #elif NPY_BITSOF_FLOAT == 80 00781 #ifndef NPY_FLOAT80 00782 #define NPY_FLOAT80 NPY_FLOAT 00783 #define NPY_COMPLEX160 NPY_CFLOAT 00784 typedef float npy_float80; 00785 typedef npy_cfloat npy_complex160; 00786 # define PyFloat80ScalarObject PyFloatScalarObject 00787 # define PyComplex160ScalarObject PyCFloatScalarObject 00788 # define PyFloat80ArrType_Type PyFloatArrType_Type 00789 # define PyComplex160ArrType_Type PyCFloatArrType_Type 00790 #define NPY_FLOAT80_FMT NPY_FLOAT_FMT 00791 #define NPY_COMPLEX160_FMT NPY_CFLOAT_FMT 00792 #endif 00793 #elif NPY_BITSOF_FLOAT == 96 00794 #ifndef NPY_FLOAT96 00795 #define NPY_FLOAT96 NPY_FLOAT 00796 #define NPY_COMPLEX192 NPY_CFLOAT 00797 typedef float npy_float96; 00798 typedef npy_cfloat npy_complex192; 00799 # define PyFloat96ScalarObject PyFloatScalarObject 00800 # define PyComplex192ScalarObject PyCFloatScalarObject 00801 # define PyFloat96ArrType_Type PyFloatArrType_Type 00802 # define PyComplex192ArrType_Type PyCFloatArrType_Type 00803 #define NPY_FLOAT96_FMT NPY_FLOAT_FMT 00804 #define NPY_COMPLEX192_FMT NPY_CFLOAT_FMT 00805 #endif 00806 #elif NPY_BITSOF_FLOAT == 128 00807 #ifndef NPY_FLOAT128 00808 #define NPY_FLOAT128 NPY_FLOAT 00809 #define NPY_COMPLEX256 NPY_CFLOAT 00810 typedef float npy_float128; 00811 typedef npy_cfloat npy_complex256; 00812 # define PyFloat128ScalarObject PyFloatScalarObject 00813 # define PyComplex256ScalarObject PyCFloatScalarObject 00814 # define PyFloat128ArrType_Type PyFloatArrType_Type 00815 # define PyComplex256ArrType_Type PyCFloatArrType_Type 00816 #define NPY_FLOAT128_FMT NPY_FLOAT_FMT 00817 #define NPY_COMPLEX256_FMT NPY_CFLOAT_FMT 00818 #endif 00819 #endif 00820 00821 /* half/float16 isn't a floating-point type in C */ 00822 #define NPY_FLOAT16 NPY_HALF 00823 typedef npy_uint16 npy_half; 00824 typedef npy_half npy_float16; 00825 00826 #if NPY_BITSOF_LONGDOUBLE == 32 00827 #ifndef NPY_FLOAT32 00828 #define NPY_FLOAT32 NPY_LONGDOUBLE 00829 #define NPY_COMPLEX64 NPY_CLONGDOUBLE 00830 typedef npy_longdouble npy_float32; 00831 typedef npy_clongdouble npy_complex64; 00832 # define PyFloat32ScalarObject PyLongDoubleScalarObject 00833 # define PyComplex64ScalarObject PyCLongDoubleScalarObject 00834 # define PyFloat32ArrType_Type PyLongDoubleArrType_Type 00835 # define PyComplex64ArrType_Type PyCLongDoubleArrType_Type 00836 #define NPY_FLOAT32_FMT NPY_LONGDOUBLE_FMT 00837 #define NPY_COMPLEX64_FMT NPY_CLONGDOUBLE_FMT 00838 #endif 00839 #elif NPY_BITSOF_LONGDOUBLE == 64 00840 #ifndef NPY_FLOAT64 00841 #define NPY_FLOAT64 NPY_LONGDOUBLE 00842 #define NPY_COMPLEX128 NPY_CLONGDOUBLE 00843 typedef npy_longdouble npy_float64; 00844 typedef npy_clongdouble npy_complex128; 00845 # define PyFloat64ScalarObject PyLongDoubleScalarObject 00846 # define PyComplex128ScalarObject PyCLongDoubleScalarObject 00847 # define PyFloat64ArrType_Type PyLongDoubleArrType_Type 00848 # define PyComplex128ArrType_Type PyCLongDoubleArrType_Type 00849 #define NPY_FLOAT64_FMT NPY_LONGDOUBLE_FMT 00850 #define NPY_COMPLEX128_FMT NPY_CLONGDOUBLE_FMT 00851 #endif 00852 #elif NPY_BITSOF_LONGDOUBLE == 80 00853 #ifndef NPY_FLOAT80 00854 #define NPY_FLOAT80 NPY_LONGDOUBLE 00855 #define NPY_COMPLEX160 NPY_CLONGDOUBLE 00856 typedef npy_longdouble npy_float80; 00857 typedef npy_clongdouble npy_complex160; 00858 # define PyFloat80ScalarObject PyLongDoubleScalarObject 00859 # define PyComplex160ScalarObject PyCLongDoubleScalarObject 00860 # define PyFloat80ArrType_Type PyLongDoubleArrType_Type 00861 # define PyComplex160ArrType_Type PyCLongDoubleArrType_Type 00862 #define NPY_FLOAT80_FMT NPY_LONGDOUBLE_FMT 00863 #define NPY_COMPLEX160_FMT NPY_CLONGDOUBLE_FMT 00864 #endif 00865 #elif NPY_BITSOF_LONGDOUBLE == 96 00866 #ifndef NPY_FLOAT96 00867 #define NPY_FLOAT96 NPY_LONGDOUBLE 00868 #define NPY_COMPLEX192 NPY_CLONGDOUBLE 00869 typedef npy_longdouble npy_float96; 00870 typedef npy_clongdouble npy_complex192; 00871 # define PyFloat96ScalarObject PyLongDoubleScalarObject 00872 # define PyComplex192ScalarObject PyCLongDoubleScalarObject 00873 # define PyFloat96ArrType_Type PyLongDoubleArrType_Type 00874 # define PyComplex192ArrType_Type PyCLongDoubleArrType_Type 00875 #define NPY_FLOAT96_FMT NPY_LONGDOUBLE_FMT 00876 #define NPY_COMPLEX192_FMT NPY_CLONGDOUBLE_FMT 00877 #endif 00878 #elif NPY_BITSOF_LONGDOUBLE == 128 00879 #ifndef NPY_FLOAT128 00880 #define NPY_FLOAT128 NPY_LONGDOUBLE 00881 #define NPY_COMPLEX256 NPY_CLONGDOUBLE 00882 typedef npy_longdouble npy_float128; 00883 typedef npy_clongdouble npy_complex256; 00884 # define PyFloat128ScalarObject PyLongDoubleScalarObject 00885 # define PyComplex256ScalarObject PyCLongDoubleScalarObject 00886 # define PyFloat128ArrType_Type PyLongDoubleArrType_Type 00887 # define PyComplex256ArrType_Type PyCLongDoubleArrType_Type 00888 #define NPY_FLOAT128_FMT NPY_LONGDOUBLE_FMT 00889 #define NPY_COMPLEX256_FMT NPY_CLONGDOUBLE_FMT 00890 #endif 00891 #elif NPY_BITSOF_LONGDOUBLE == 256 00892 #define NPY_FLOAT256 NPY_LONGDOUBLE 00893 #define NPY_COMPLEX512 NPY_CLONGDOUBLE 00894 typedef npy_longdouble npy_float256; 00895 typedef npy_clongdouble npy_complex512; 00896 # define PyFloat256ScalarObject PyLongDoubleScalarObject 00897 # define PyComplex512ScalarObject PyCLongDoubleScalarObject 00898 # define PyFloat256ArrType_Type PyLongDoubleArrType_Type 00899 # define PyComplex512ArrType_Type PyCLongDoubleArrType_Type 00900 #define NPY_FLOAT256_FMT NPY_LONGDOUBLE_FMT 00901 #define NPY_COMPLEX512_FMT NPY_CLONGDOUBLE_FMT 00902 #endif 00903 00904 /* datetime typedefs */ 00905 typedef npy_int64 npy_timedelta; 00906 typedef npy_int64 npy_datetime; 00907 #define NPY_DATETIME_FMT NPY_INT64_FMT 00908 #define NPY_TIMEDELTA_FMT NPY_INT64_FMT 00909 00910 /* End of typedefs for numarray style bit-width names */ 00911 00912 #endif 00913