numpy
2.0.0
|
#include <Python.h>
#include <structmember.h>
#include <string.h>
#include "numpy/arrayobject.h"
#include "numpy/npy_3kcompat.h"
#include "numpy/npy_math.h"
#include "npy_config.h"
#include "templ_common.h"
Defines | |
#define | NPY_NO_DEPRECATED_API NPY_API_VERSION |
#define | _MULTIARRAYMODULE |
#define | LIKELY_IN_CACHE_SIZE 8 |
#define | _TESTDOC1(typebase) (Py_TYPE(obj) == &Py##typebase##_Type) |
#define | _TESTDOC2(typebase) (Py_TYPE(obj) == Py##typebase##_TypePtr) |
#define | _ADDDOC(typebase, doc, name) |
Functions | |
static int | check_array_monotonic (const double *a, npy_int lena) |
static void | minmax (const npy_intp *data, npy_intp data_len, npy_intp *mn, npy_intp *mx) |
NPY_NO_EXPORT PyObject * | arr_bincount (PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwds) |
NPY_NO_EXPORT PyObject * | arr_digitize (PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwds) |
NPY_NO_EXPORT PyObject * | arr_insert (PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwdict) |
static npy_intp | binary_search_with_guess (const npy_double key, const npy_double *arr, npy_intp len, npy_intp guess) |
NPY_NO_EXPORT PyObject * | arr_interp (PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwdict) |
NPY_NO_EXPORT PyObject * | arr_interp_complex (PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwdict) |
static int | sequence_to_arrays (PyObject *seq, PyArrayObject **op, int count, char *paramname) |
static int | ravel_multi_index_loop (int ravel_ndim, npy_intp *ravel_dims, npy_intp *ravel_strides, npy_intp count, NPY_CLIPMODE *modes, char **coords, npy_intp *coords_strides) |
NPY_NO_EXPORT PyObject * | arr_ravel_multi_index (PyObject *self, PyObject *args, PyObject *kwds) |
static int | unravel_index_loop_corder (int unravel_ndim, npy_intp *unravel_dims, npy_intp unravel_size, npy_intp count, char *indices, npy_intp indices_stride, npy_intp *coords) |
static int | unravel_index_loop_forder (int unravel_ndim, npy_intp *unravel_dims, npy_intp unravel_size, npy_intp count, char *indices, npy_intp indices_stride, npy_intp *coords) |
NPY_NO_EXPORT PyObject * | arr_unravel_index (PyObject *self, PyObject *args, PyObject *kwds) |
NPY_NO_EXPORT PyObject * | arr_add_docstring (PyObject *NPY_UNUSED(dummy), PyObject *args) |
static NPY_INLINE void | pack_inner (const char *inptr, npy_intp element_size, npy_intp n_in, npy_intp in_stride, char *outptr, npy_intp n_out, npy_intp out_stride) |
static PyObject * | pack_bits (PyObject *input, int axis) |
static PyObject * | unpack_bits (PyObject *input, int axis) |
NPY_NO_EXPORT PyObject * | io_pack (PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwds) |
NPY_NO_EXPORT PyObject * | io_unpack (PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwds) |
do { \ Py##typebase##Object *new = (Py##typebase##Object *)obj; \ if (!(doc)) { \ doc = docstr; \ } \ else { \ PyErr_Format(PyExc_RuntimeError, "%s method %s", name, msg); \ return NULL; \ } \ } while (0)
#define _MULTIARRAYMODULE |
#define _TESTDOC1 | ( | typebase | ) | (Py_TYPE(obj) == &Py##typebase##_Type) |
#define _TESTDOC2 | ( | typebase | ) | (Py_TYPE(obj) == Py##typebase##_TypePtr) |
#define LIKELY_IN_CACHE_SIZE 8 |
#define NPY_NO_DEPRECATED_API NPY_API_VERSION |
NPY_NO_EXPORT PyObject* arr_add_docstring | ( | PyObject * | NPY_UNUSEDdummy, |
PyObject * | args | ||
) |
Referenced by test_interrupt().
NPY_NO_EXPORT PyObject* arr_bincount | ( | PyObject * | NPY_UNUSEDself, |
PyObject * | args, | ||
PyObject * | kwds | ||
) |
Referenced by _PyArray_GetSigintBuf().
NPY_NO_EXPORT PyObject* arr_digitize | ( | PyObject * | NPY_UNUSEDself, |
PyObject * | args, | ||
PyObject * | kwds | ||
) |
Referenced by _PyArray_GetSigintBuf().
NPY_NO_EXPORT PyObject* arr_insert | ( | PyObject * | NPY_UNUSEDself, |
PyObject * | args, | ||
PyObject * | kwdict | ||
) |
<
Referenced by _PyArray_GetSigintBuf().
NPY_NO_EXPORT PyObject* arr_interp | ( | PyObject * | NPY_UNUSEDself, |
PyObject * | args, | ||
PyObject * | kwdict | ||
) |
Referenced by _PyArray_GetSigintBuf().
NPY_NO_EXPORT PyObject* arr_interp_complex | ( | PyObject * | NPY_UNUSEDself, |
PyObject * | args, | ||
PyObject * | kwdict | ||
) |
Referenced by _PyArray_GetSigintBuf().
NPY_NO_EXPORT PyObject* arr_ravel_multi_index | ( | PyObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) |
Referenced by _PyArray_GetSigintBuf().
NPY_NO_EXPORT PyObject* arr_unravel_index | ( | PyObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) |
Referenced by test_interrupt().
static npy_intp binary_search_with_guess | ( | const npy_double | key, |
const npy_double * | arr, | ||
npy_intp | len, | ||
npy_intp | guess | ||
) | [static] |
<blockquote> key < arr[0] -- -1 key == arr[len - 1] -- len - 1 key > arr[len - 1] -- len</blockquote>
static int check_array_monotonic | ( | const double * | a, |
npy_int | lena | ||
) | [static] |
NPY_NO_EXPORT PyObject* io_pack | ( | PyObject * | NPY_UNUSEDself, |
PyObject * | args, | ||
PyObject * | kwds | ||
) |
Referenced by test_interrupt().
NPY_NO_EXPORT PyObject* io_unpack | ( | PyObject * | NPY_UNUSEDself, |
PyObject * | args, | ||
PyObject * | kwds | ||
) |
Referenced by test_interrupt().
static void minmax | ( | const npy_intp * | data, |
npy_intp | data_len, | ||
npy_intp * | mn, | ||
npy_intp * | mx | ||
) | [static] |
References NPY_INTP, PyArray_ContiguousFromAny, and PyArray_SIZE.
static PyObject* pack_bits | ( | PyObject * | input, |
int | axis | ||
) | [static] |
static NPY_INLINE void pack_inner | ( | const char * | inptr, |
npy_intp | element_size, | ||
npy_intp | n_in, | ||
npy_intp | in_stride, | ||
char * | outptr, | ||
npy_intp | n_out, | ||
npy_intp | out_stride | ||
) | [static] |
<blockquote> Yes: set corresponding bit (and adjust build value) No: move on</blockquote>
<
<
element_size |
in bytes
static int ravel_multi_index_loop | ( | int | ravel_ndim, |
npy_intp * | ravel_dims, | ||
npy_intp * | ravel_strides, | ||
npy_intp | count, | ||
NPY_CLIPMODE * | modes, | ||
char ** | coords, | ||
npy_intp * | coords_strides | ||
) | [static] |
static int sequence_to_arrays | ( | PyObject * | seq, |
PyArrayObject ** | op, | ||
int | count, | ||
char * | paramname | ||
) | [static] |
static PyObject* unpack_bits | ( | PyObject * | input, |
int | axis | ||
) | [static] |
static int unravel_index_loop_corder | ( | int | unravel_ndim, |
npy_intp * | unravel_dims, | ||
npy_intp | unravel_size, | ||
npy_intp | count, | ||
char * | indices, | ||
npy_intp | indices_stride, | ||
npy_intp * | coords | ||
) | [static] |