|
numpy 2.0.0
|
#include <Python.h>#include "structmember.h"#include "numpy/arrayobject.h"#include "numpy/arrayscalars.h"#include "numpy/npy_math.h"#include "npy_config.h"#include "numpy/npy_3kcompat.h"#include "common.h"#include "ctors.h"#include "lowlevel_strided_loops.h"Defines | |
| #define | PY_SSIZE_T_CLEAN |
| #define | NPY_NO_DEPRECATED_API |
| #define | _MULTIARRAYMODULE |
| #define | NPY_NO_PREFIX |
| #define | PyAO PyArrayObject |
| #define | _check_axis PyArray_CheckAxis |
| #define | SWAPAXES(op, ap) |
| #define | SWAPBACK(op, ap) |
| #define | SWAPINTP(a, b) {intp c; c=(a); (a) = (b); (b) = c;} |
| #define | SWAPAXES2(ap) |
| #define | SWAPBACK2(ap) |
Functions | |
| NPY_NO_EXPORT PyObject * | PyArray_TakeFrom (PyArrayObject *self0, PyObject *indices0, int axis, PyArrayObject *ret, NPY_CLIPMODE clipmode) |
| NPY_NO_EXPORT PyObject * | PyArray_PutTo (PyArrayObject *self, PyObject *values0, PyObject *indices0, NPY_CLIPMODE clipmode) |
| NPY_NO_EXPORT PyObject * | PyArray_PutMask (PyArrayObject *self, PyObject *values0, PyObject *mask0) |
| NPY_NO_EXPORT PyObject * | PyArray_Repeat (PyArrayObject *aop, PyObject *op, int axis) |
| NPY_NO_EXPORT PyObject * | PyArray_Choose (PyArrayObject *ip, PyObject *op, PyArrayObject *ret, NPY_CLIPMODE clipmode) |
| static int | _new_sort (PyArrayObject *op, int axis, NPY_SORTKIND which) |
| static PyObject * | _new_argsort (PyArrayObject *op, int axis, NPY_SORTKIND which) |
| static int | qsortCompare (const void *a, const void *b) |
| NPY_NO_EXPORT int | PyArray_Sort (PyArrayObject *op, int axis, NPY_SORTKIND which) |
| static int | argsort_static_compare (const void *ip1, const void *ip2) |
| NPY_NO_EXPORT PyObject * | PyArray_ArgSort (PyArrayObject *op, int axis, NPY_SORTKIND which) |
| NPY_NO_EXPORT PyObject * | PyArray_LexSort (PyObject *sort_keys, int axis) |
| static void | local_search_left (PyArrayObject *arr, PyArrayObject *key, PyArrayObject *ret) |
| static void | local_search_right (PyArrayObject *arr, PyArrayObject *key, PyArrayObject *ret) |
| NPY_NO_EXPORT PyObject * | PyArray_SearchSorted (PyArrayObject *op1, PyObject *op2, NPY_SEARCHSIDE side) |
| NPY_NO_EXPORT PyObject * | PyArray_Diagonal (PyArrayObject *self, int offset, int axis1, int axis2) |
| NPY_NO_EXPORT PyObject * | PyArray_Compress (PyArrayObject *self, PyObject *condition, int axis, PyArrayObject *out) |
| NPY_NO_EXPORT npy_intp | PyArray_CountNonzero (PyArrayObject *self) |
| NPY_NO_EXPORT PyObject * | PyArray_Nonzero (PyArrayObject *self) |
Variables | |
| static PyArrayObject * | global_obj |
| static char * | global_data |
| #define _check_axis PyArray_CheckAxis |
Referenced by PyArray_TakeFrom().
| #define _MULTIARRAYMODULE |
| #define NPY_NO_DEPRECATED_API |
| #define NPY_NO_PREFIX |
| #define PY_SSIZE_T_CLEAN |
| #define PyAO PyArrayObject |
Referenced by PyArray_SearchSorted(), and PyArray_TakeFrom().
| #define SWAPAXES | ( | op, | |
| ap | |||
| ) |
{ \
orign = (ap)->nd-1; \
if (axis != orign) { \
(op) = (PyAO *)PyArray_SwapAxes((ap), axis, orign); \
Py_DECREF((ap)); \
if ((op) == NULL) return NULL; \
} \
else (op) = (ap); \
}
| #define SWAPAXES2 | ( | ap | ) |
{ \
orign = (ap)->nd-1; \
if (axis != orign) { \
SWAPINTP(ap->dimensions[axis], ap->dimensions[orign]); \
SWAPINTP(ap->strides[axis], ap->strides[orign]); \
PyArray_UpdateFlags(ap, NPY_ARRAY_C_CONTIGUOUS | \
NPY_ARRAY_F_CONTIGUOUS); \
} \
}
| #define SWAPBACK | ( | op, | |
| ap | |||
| ) |
{ \
if (axis != orign) { \
(op) = (PyAO *)PyArray_SwapAxes((ap), axis, orign); \
Py_DECREF((ap)); \
if ((op) == NULL) return NULL; \
} \
else (op) = (ap); \
}
| #define SWAPBACK2 | ( | ap | ) |
{ \
if (axis != orign) { \
SWAPINTP(ap->dimensions[axis], ap->dimensions[orign]); \
SWAPINTP(ap->strides[axis], ap->strides[orign]); \
PyArray_UpdateFlags(ap, NPY_ARRAY_C_CONTIGUOUS | \
NPY_ARRAY_F_CONTIGUOUS); \
} \
}
| #define SWAPINTP | ( | a, | |
| b | |||
| ) | {intp c; c=(a); (a) = (b); (b) = c;} |
| static PyObject* _new_argsort | ( | PyArrayObject * | op, |
| int | axis, | ||
| NPY_SORTKIND | which | ||
| ) | [static] |
| static int _new_sort | ( | PyArrayObject * | op, |
| int | axis, | ||
| NPY_SORTKIND | which | ||
| ) | [static] |
References _strided_byte_swap(), _unaligned_strided_byte_copy(), PyArrayIterObject_tag::dataptr, PyArray_ITER_NEXT, PyDataMem_FREE, and PyDataMem_NEW.
| static int argsort_static_compare | ( | const void * | ip1, |
| const void * | ip2 | ||
| ) | [static] |
| static void local_search_left | ( | PyArrayObject * | arr, |
| PyArrayObject * | key, | ||
| PyArrayObject * | ret | ||
| ) | [static] |
| static void local_search_right | ( | PyArrayObject * | arr, |
| PyArrayObject * | key, | ||
| PyArrayObject * | ret | ||
| ) | [static] |
| NPY_NO_EXPORT PyObject* PyArray_ArgSort | ( | PyArrayObject * | op, |
| int | axis, | ||
| NPY_SORTKIND | which | ||
| ) |
| NPY_NO_EXPORT PyObject* PyArray_Choose | ( | PyArrayObject * | ip, |
| PyObject * | op, | ||
| PyArrayObject * | ret, | ||
| NPY_CLIPMODE | clipmode | ||
| ) |
| NPY_NO_EXPORT PyObject* PyArray_Compress | ( | PyArrayObject * | self, |
| PyObject * | condition, | ||
| int | axis, | ||
| PyArrayObject * | out | ||
| ) |
| NPY_NO_EXPORT npy_intp PyArray_CountNonzero | ( | PyArrayObject * | self | ) |
| NPY_NO_EXPORT PyObject* PyArray_Diagonal | ( | PyArrayObject * | self, |
| int | offset, | ||
| int | axis1, | ||
| int | axis2 | ||
| ) |
| NPY_NO_EXPORT PyObject* PyArray_LexSort | ( | PyObject * | sort_keys, |
| int | axis | ||
| ) |
| NPY_NO_EXPORT PyObject* PyArray_Nonzero | ( | PyArrayObject * | self | ) |
Referenced by array_dot().
| NPY_NO_EXPORT PyObject* PyArray_PutMask | ( | PyArrayObject * | self, |
| PyObject * | values0, | ||
| PyObject * | mask0 | ||
| ) |
<
| NPY_NO_EXPORT PyObject* PyArray_PutTo | ( | PyArrayObject * | self, |
| PyObject * | values0, | ||
| PyObject * | indices0, | ||
| NPY_CLIPMODE | clipmode | ||
| ) |
| NPY_NO_EXPORT PyObject* PyArray_Repeat | ( | PyArrayObject * | aop, |
| PyObject * | op, | ||
| int | axis | ||
| ) |
| NPY_NO_EXPORT PyObject* PyArray_SearchSorted | ( | PyArrayObject * | op1, |
| PyObject * | op2, | ||
| NPY_SEARCHSIDE | side | ||
| ) |
References PyArrayObject::dimensions, PyArray_Dims::len, MAX_DIMS, MIN, PyArray_Dims::ptr, PyAO, PyArray_DATA, PyArray_INTP, PyArray_IterNew(), PyArray_New(), PyArray_Transpose(), and PyArray_Type.
| NPY_NO_EXPORT int PyArray_Sort | ( | PyArrayObject * | op, |
| int | axis, | ||
| NPY_SORTKIND | which | ||
| ) |
<
| NPY_NO_EXPORT PyObject* PyArray_TakeFrom | ( | PyArrayObject * | self0, |
| PyObject * | indices0, | ||
| int | axis, | ||
| PyArrayObject * | ret, | ||
| NPY_CLIPMODE | clipmode | ||
| ) |
References _check_axis, PyArrayObject::base, PyArrayObject::data, PyArrayObject::descr, PyArrayObject::dimensions, _PyArray_Descr::elsize, MAX_DIMS, PyArrayObject::nd, NPY_ARRAY_CARRAY, NPY_ARRAY_ENSURECOPY, NPY_ARRAY_UPDATEIFCOPY, NPY_CLIP, NPY_RAISE, NPY_WRAP, Py_TYPE, PyAO, PyArray_CompareLists(), PyArray_ContiguousFromAny, PyArray_FromArray(), PyArray_INCREF(), PyArray_INTP, PyArray_NewFromDescr(), and PyArray_XDECREF_ERR.
| static int qsortCompare | ( | const void * | a, |
| const void * | b | ||
| ) | [static] |
char* global_data [static] |
PyArrayObject* global_obj [static] |