numpy 2.0.0
|
#include <Python.h>
#include "structmember.h"
#include "numpy/arrayobject.h"
#include "npy_config.h"
#include "numpy/npy_3kcompat.h"
#include "common.h"
#include "iterators.h"
#include "mapping.h"
Defines | |
#define | PY_SSIZE_T_CLEAN |
#define | NPY_NO_DEPRECATED_API |
#define | _MULTIARRAYMODULE |
#define | NPY_NO_PREFIX |
#define | SOBJ_NOTFANCY 0 |
#define | SOBJ_ISFANCY 1 |
#define | SOBJ_BADARRAY 2 |
#define | SOBJ_TOOMANY 3 |
#define | SOBJ_LISTTUP 4 |
Functions | |
static PyObject * | array_subscript_simple (PyArrayObject *self, PyObject *op) |
NPY_NO_EXPORT Py_ssize_t | array_length (PyArrayObject *self) |
NPY_NO_EXPORT PyObject * | array_big_item (PyArrayObject *self, intp i) |
NPY_NO_EXPORT int | _array_ass_item (PyArrayObject *self, Py_ssize_t i, PyObject *v) |
NPY_NO_EXPORT PyObject * | array_item_nice (PyArrayObject *self, Py_ssize_t i) |
NPY_NO_EXPORT int | array_ass_big_item (PyArrayObject *self, intp i, PyObject *v) |
static void | _swap_axes (PyArrayMapIterObject *mit, PyArrayObject **ret, int getmap) |
static PyObject * | PyArray_GetMap (PyArrayMapIterObject *mit) |
static int | PyArray_SetMap (PyArrayMapIterObject *mit, PyObject *op) |
NPY_NO_EXPORT int | count_new_axes_0d (PyObject *tuple) |
NPY_NO_EXPORT PyObject * | add_new_axes_0d (PyArrayObject *arr, int newaxis_count) |
static int | fancy_indexing_check (PyObject *args) |
NPY_NO_EXPORT PyObject * | array_subscript (PyArrayObject *self, PyObject *op) |
static int | array_ass_sub_simple (PyArrayObject *self, PyObject *index, PyObject *op) |
static int | _tuple_of_integers (PyObject *seq, intp *vals, int maxvals) |
static int | array_ass_sub (PyArrayObject *self, PyObject *index, PyObject *op) |
static PyObject * | array_subscript_nice (PyArrayObject *self, PyObject *op) |
static int | _nonzero_indices (PyObject *myBool, PyArrayIterObject **iters) |
static int | _convert_obj (PyObject *obj, PyArrayIterObject **iter) |
NPY_NO_EXPORT void | PyArray_MapIterReset (PyArrayMapIterObject *mit) |
NPY_NO_EXPORT void | PyArray_MapIterNext (PyArrayMapIterObject *mit) |
NPY_NO_EXPORT void | PyArray_MapIterBind (PyArrayMapIterObject *mit, PyArrayObject *arr) |
NPY_NO_EXPORT PyObject * | PyArray_MapIterNew (PyObject *indexobj, int oned, int fancy) |
static void | arraymapiter_dealloc (PyArrayMapIterObject *mit) |
Variables | |
NPY_NO_EXPORT PyMappingMethods | array_as_mapping |
NPY_NO_EXPORT PyTypeObject | PyArrayMapIter_Type |
#define _MULTIARRAYMODULE |
#define NPY_NO_DEPRECATED_API |
#define NPY_NO_PREFIX |
#define PY_SSIZE_T_CLEAN |
#define SOBJ_BADARRAY 2 |
Referenced by count_new_axes_0d().
#define SOBJ_ISFANCY 1 |
Referenced by count_new_axes_0d().
#define SOBJ_LISTTUP 4 |
#define SOBJ_NOTFANCY 0 |
Referenced by fancy_indexing_check().
#define SOBJ_TOOMANY 3 |
Referenced by count_new_axes_0d().
NPY_NO_EXPORT int _array_ass_item | ( | PyArrayObject * | self, |
Py_ssize_t | i, | ||
PyObject * | v | ||
) |
static int _convert_obj | ( | PyObject * | obj, |
PyArrayIterObject ** | iter | ||
) | [static] |
References PyArrayMapIterObject::iteraxes.
static int _nonzero_indices | ( | PyObject * | myBool, |
PyArrayIterObject ** | iters | ||
) | [static] |
<blockquote class="first">
</blockquote>
It is an iterator object with a next method * It abstracts the n-dimensional mapping behavior to make the looping *
<blockquote class="last"> code more understandable (maybe) * and so that indexing can be set up ahead of time *</blockquote>
static void _swap_axes | ( | PyArrayMapIterObject * | mit, |
PyArrayObject ** | ret, | ||
int | getmap | ||
) | [static] |
static int _tuple_of_integers | ( | PyObject * | seq, |
intp * | vals, | ||
int | maxvals | ||
) | [static] |
NPY_NO_EXPORT PyObject* add_new_axes_0d | ( | PyArrayObject * | arr, |
int | newaxis_count | ||
) |
NPY_NO_EXPORT int array_ass_big_item | ( | PyArrayObject * | self, |
intp | i, | ||
PyObject * | v | ||
) |
static int array_ass_sub | ( | PyArrayObject * | self, |
PyObject * | index, | ||
PyObject * | op | ||
) | [static] |
</blockquote>
<
static int array_ass_sub_simple | ( | PyArrayObject * | self, |
PyObject * | index, | ||
PyObject * | op | ||
) | [static] |
NPY_NO_EXPORT PyObject* array_big_item | ( | PyArrayObject * | self, |
intp | i | ||
) |
NPY_NO_EXPORT PyObject* array_item_nice | ( | PyArrayObject * | self, |
Py_ssize_t | i | ||
) |
NPY_NO_EXPORT Py_ssize_t array_length | ( | PyArrayObject * | self | ) |
NPY_NO_EXPORT PyObject* array_subscript | ( | PyArrayObject * | self, |
PyObject * | op | ||
) |
Referenced by _strings_richcompare().
static PyObject* array_subscript_nice | ( | PyArrayObject * | self, |
PyObject * | op | ||
) | [static] |
References Bool, PyArrayObject::data, PyArrayObject::dimensions, MAX_DIMS, PyArrayObject::nd, NPY_ARRAY_CARRAY, NPY_BOOL, PyArray_DescrFromType(), PyArray_FromAny(), PyArray_INTP, PyArray_IterNew(), PyArray_New(), PyArray_SIZE, and PyArray_Type.
NPY_NO_EXPORT PyObject * array_subscript_simple | ( | PyArrayObject * | self, |
PyObject * | op | ||
) | [static] |
static void arraymapiter_dealloc | ( | PyArrayMapIterObject * | mit | ) | [static] |
Referenced by PyArray_MapIterNew().
NPY_NO_EXPORT int count_new_axes_0d | ( | PyObject * | tuple | ) |
References MAX_DIMS, PyArray_Check, PyArray_ISBOOL, PyArray_ISINTEGER, SOBJ_BADARRAY, SOBJ_ISFANCY, and SOBJ_TOOMANY.
static int fancy_indexing_check | ( | PyObject * | args | ) | [static] |
References SOBJ_NOTFANCY.
static PyObject* PyArray_GetMap | ( | PyArrayMapIterObject * | mit | ) | [static] |
<
NPY_NO_EXPORT void PyArray_MapIterBind | ( | PyArrayMapIterObject * | mit, |
PyArrayObject * | arr | ||
) |
NPY_NO_EXPORT PyObject* PyArray_MapIterNew | ( | PyObject * | indexobj, |
int | oned, | ||
int | fancy | ||
) |
References arraymapiter_dealloc().
NPY_NO_EXPORT void PyArray_MapIterNext | ( | PyArrayMapIterObject * | mit | ) |
References Py_TYPE.
NPY_NO_EXPORT void PyArray_MapIterReset | ( | PyArrayMapIterObject * | mit | ) |
static int PyArray_SetMap | ( | PyArrayMapIterObject * | mit, |
PyObject * | op | ||
) | [static] |
<
NPY_NO_EXPORT PyMappingMethods array_as_mapping |
{ (inquiry)array_length, (binaryfunc)array_subscript_nice, (objobjargproc)array_ass_sub, }
NPY_NO_EXPORT PyTypeObject PyArrayMapIter_Type |