numpy
2.0.0
|
#include <Python.h>
#include "structmember.h"
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
#include "numpy/npy_math.h"
#include "numpy/npy_cpu.h"
#include "npy_config.h"
#include "npy_pycompat.h"
#include "common.h"
#include "arrayobject.h"
#include "ctors.h"
#include "lowlevel_strided_loops.h"
#include "item_selection.h"
#include "npy_sort.h"
#include "npy_partition.h"
#include "npy_binsearch.h"
#define _MULTIARRAYMODULE |
#define NPY_NO_DEPRECATED_API NPY_API_VERSION |
#define PY_SSIZE_T_CLEAN |
static PyObject* _new_argsortlike | ( | PyArrayObject * | op, |
int | axis, | ||
PyArray_ArgSortFunc * | argsort, | ||
PyArray_ArgPartitionFunc * | argpart, | ||
npy_intp * | kth, | ||
npy_intp | nkth | ||
) | [static] |
static int _new_sortlike | ( | PyArrayObject * | op, |
int | axis, | ||
PyArray_SortFunc * | sort, | ||
PyArray_PartitionFunc * | part, | ||
npy_intp * | kth, | ||
npy_intp | nkth | ||
) | [static] |
NPY_NO_EXPORT npy_intp count_boolean_trues | ( | int | ndim, |
char * | data, | ||
npy_intp * | ashape, | ||
npy_intp * | astrides | ||
) |
static NPY_INLINE npy_intp count_nonzero_bytes_384 | ( | const npy_uint64 * | w | ) | [static] |
static PyArrayObject* partition_prep_kth_array | ( | PyArrayObject * | ktharray, |
PyArrayObject * | op, | ||
int | axis | ||
) | [static] |
NPY_NO_EXPORT PyObject* PyArray_ArgPartition | ( | PyArrayObject * | op, |
PyArrayObject * | ktharray, | ||
int | axis, | ||
NPY_SELECTKIND | which | ||
) |
NPY_NO_EXPORT PyObject* PyArray_ArgSort | ( | PyArrayObject * | op, |
int | axis, | ||
NPY_SORTKIND | which | ||
) |
NPY_NO_EXPORT PyObject* PyArray_Choose | ( | PyArrayObject * | ip, |
PyObject * | op, | ||
PyArrayObject * | out, | ||
NPY_CLIPMODE | clipmode | ||
) |
NPY_NO_EXPORT PyObject* PyArray_Compress | ( | PyArrayObject * | self, |
PyObject * | condition, | ||
int | axis, | ||
PyArrayObject * | out | ||
) |
References NpyIter_Deallocate().
NPY_NO_EXPORT PyObject* PyArray_Diagonal | ( | PyArrayObject * | self, |
int | offset, | ||
int | axis1, | ||
int | axis2 | ||
) |
References c.
NPY_NO_EXPORT PyObject* PyArray_LexSort | ( | PyObject * | sort_keys, |
int | axis | ||
) |
NPY_NO_EXPORT PyObject* PyArray_MultiIndexGetItem | ( | PyArrayObject * | self, |
npy_intp * | multi_index | ||
) |
NPY_NO_EXPORT int PyArray_MultiIndexSetItem | ( | PyArrayObject * | self, |
npy_intp * | multi_index, | ||
PyObject * | obj | ||
) |
NPY_NO_EXPORT PyObject* PyArray_Nonzero | ( | PyArrayObject * | self | ) |
References check_and_adjust_index(), PyArray_DATA, PyArray_DESCR, PyArray_NDIM, PyArray_SHAPE(), and PyArray_STRIDES.
Referenced by array_sum().
NPY_NO_EXPORT int PyArray_Partition | ( | PyArrayObject * | op, |
PyArrayObject * | ktharray, | ||
int | axis, | ||
NPY_SELECTKIND | which | ||
) |
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, | ||
PyObject * | perm | ||
) |
result is an array of indexes, one for each element in op2, such that if the item were to be inserted in op1 just before that index the array would still be in sorted order.
Binary search is used to find the indexes.
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 * | out, | ||
NPY_CLIPMODE | clipmode | ||
) |
References check_and_adjust_index(), NPY_ARRAY_CARRAY, NPY_ARRAY_ENSURECOPY, NPY_ARRAY_UPDATEIFCOPY, NPY_BEGIN_THREADS_DEF, NPY_BEGIN_THREADS_DESCR, NPY_CLIP, NPY_END_THREADS, NPY_INTP, NPY_MAXDIMS, NPY_RAISE, NPY_WRAP, PyArray_CheckAxis(), PyArray_CompareLists(), PyArray_ContiguousFromAny, PyArray_DATA, PyArray_DESCR, PyArray_DIMS, PyArray_FromArray(), PyArray_Item_INCREF(), PyArray_Item_XDECREF(), PyArray_ITEMSIZE, PyArray_NDIM, PyArray_NewFromDescr(), PyArray_SIZE, PyArray_XDECREF_ERR(), and PyDataType_REFCHK.