numpy
2.0.0
|
00001 #ifndef _NPY_PRIVATE_CONVERSION_UTILS_H_ 00002 #define _NPY_PRIVATE_CONVERSION_UTILS_H_ 00003 00004 NPY_NO_EXPORT int 00005 PyArray_IntpConverter(PyObject *obj, PyArray_Dims *seq); 00006 00007 NPY_NO_EXPORT int 00008 PyArray_BufferConverter(PyObject *obj, PyArray_Chunk *buf); 00009 00010 NPY_NO_EXPORT int 00011 PyArray_BoolConverter(PyObject *object, npy_bool *val); 00012 00013 NPY_NO_EXPORT int 00014 PyArray_ByteorderConverter(PyObject *obj, char *endian); 00015 00016 NPY_NO_EXPORT int 00017 PyArray_SortkindConverter(PyObject *obj, NPY_SORTKIND *sortkind); 00018 00019 NPY_NO_EXPORT int 00020 PyArray_SearchsideConverter(PyObject *obj, void *addr); 00021 00022 NPY_NO_EXPORT int 00023 PyArray_PyIntAsInt(PyObject *o); 00024 00025 NPY_NO_EXPORT npy_intp 00026 PyArray_PyIntAsIntp(PyObject *o); 00027 00028 NPY_NO_EXPORT int 00029 PyArray_IntpFromSequence(PyObject *seq, npy_intp *vals, int maxvals); 00030 00031 NPY_NO_EXPORT int 00032 PyArray_TypestrConvert(int itemsize, int gentype); 00033 00034 NPY_NO_EXPORT PyObject * 00035 PyArray_IntTupleFromIntp(int len, npy_intp *vals); 00036 00037 /* 00038 * Converts an axis parameter into an ndim-length C-array of 00039 * boolean flags, True for each axis specified. 00040 * 00041 * If obj is None, everything is set to True. If obj is a tuple, 00042 * each axis within the tuple is set to True. If obj is an integer, 00043 * just that axis is set to True. 00044 */ 00045 NPY_NO_EXPORT int 00046 PyArray_ConvertMultiAxis(PyObject *axis_in, int ndim, npy_bool *out_axis_flags); 00047 00058 #ifdef NPY_ENABLE_SEPARATE_COMPILATION 00059 extern NPY_NO_EXPORT int evil_global_disable_warn_O4O8_flag; 00060 #else 00061 NPY_NO_EXPORT int evil_global_disable_warn_O4O8_flag; 00062 #endif 00063 00064 #endif