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