numpy  2.0.0
src/multiarray/mapping.h
Go to the documentation of this file.
00001 #ifndef _NPY_ARRAYMAPPING_H_
00002 #define _NPY_ARRAYMAPPING_H_
00003 
00004 #ifdef NPY_ENABLE_SEPARATE_COMPILATION
00005 extern NPY_NO_EXPORT PyMappingMethods array_as_mapping;
00006 #else
00007 NPY_NO_EXPORT PyMappingMethods array_as_mapping;
00008 #endif
00009 
00010 NPY_NO_EXPORT PyObject *
00011 array_big_item(PyArrayObject *self, npy_intp i);
00012 
00013 NPY_NO_EXPORT Py_ssize_t
00014 array_length(PyArrayObject *self);
00015 
00016 NPY_NO_EXPORT PyObject *
00017 array_item_nice(PyArrayObject *self, Py_ssize_t i);
00018 
00019 NPY_NO_EXPORT PyObject *
00020 array_subscript(PyArrayObject *self, PyObject *op);
00021 
00022 NPY_NO_EXPORT int
00023 array_ass_big_item(PyArrayObject *self, npy_intp i, PyObject *v);
00024 
00025 #if PY_VERSION_HEX < 0x02050000
00026         #if SIZEOF_INT == NPY_SIZEOF_INTP
00027                 #define array_ass_item array_ass_big_item
00028         #endif
00029 #else
00030         #if SIZEOF_SIZE_T == NPY_SIZEOF_INTP
00031                 #define array_ass_item array_ass_big_item
00032         #endif
00033 #endif
00034 #ifndef array_ass_item
00035 NPY_NO_EXPORT int
00036 _array_ass_item(PyArrayObject *self, Py_ssize_t i, PyObject *v);
00037 #define array_ass_item _array_ass_item
00038 #endif
00039 
00040 NPY_NO_EXPORT PyObject *
00041 add_new_axes_0d(PyArrayObject *,  int);
00042 
00043 NPY_NO_EXPORT int
00044 count_new_axes_0d(PyObject *tuple);
00045 
00046 /*
00047  * Prototypes for Mapping calls --- not part of the C-API
00048  * because only useful as part of a getitem call.
00049  */
00050 NPY_NO_EXPORT void
00051 PyArray_MapIterReset(PyArrayMapIterObject *mit);
00052 
00053 NPY_NO_EXPORT void
00054 PyArray_MapIterNext(PyArrayMapIterObject *mit);
00055 
00056 NPY_NO_EXPORT void
00057 PyArray_MapIterBind(PyArrayMapIterObject *, PyArrayObject *);
00058 
00059 NPY_NO_EXPORT PyObject*
00060 PyArray_MapIterNew(PyObject *, int, int);
00061 
00062 #endif