numpy 2.0.0
|
#include <stdarg.h>
#include <Python.h>
#include "structmember.h"
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
#include "npy_config.h"
#include "numpy/npy_3kcompat.h"
#include "common.h"
#include "ctors.h"
#include "calculation.h"
#include "methods.h"
#include "convert_datatype.h"
#include <stdio.h>
Defines | |
#define | PY_SSIZE_T_CLEAN |
#define | NPY_NO_DEPRECATED_API |
#define | _MULTIARRAYMODULE |
#define | NPY_NO_PREFIX |
#define | _ARET(x) PyArray_Return((PyArrayObject *)(x)) |
#define | _CHKTYPENUM(typ) ((typ) ? (typ)->type_num : PyArray_NOTYPE) |
Functions | |
static int | NpyArg_ParseKeywords (PyObject *keys, const char *format, char **kwlist,...) |
static PyObject * | array_take (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_fill (PyArrayObject *self, PyObject *args) |
static PyObject * | array_put (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_reshape (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_squeeze (PyArrayObject *self, PyObject *args) |
static PyObject * | array_view (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_argmax (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_argmin (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_max (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_ptp (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_min (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_swapaxes (PyArrayObject *self, PyObject *args) |
NPY_NO_EXPORT PyObject * | PyArray_GetField (PyArrayObject *self, PyArray_Descr *typed, int offset) |
static PyObject * | array_getfield (PyArrayObject *self, PyObject *args, PyObject *kwds) |
NPY_NO_EXPORT int | PyArray_SetField (PyArrayObject *self, PyArray_Descr *dtype, int offset, PyObject *val) |
static PyObject * | array_setfield (PyArrayObject *self, PyObject *args, PyObject *kwds) |
NPY_NO_EXPORT PyObject * | PyArray_Byteswap (PyArrayObject *self, Bool inplace) |
static PyObject * | array_byteswap (PyArrayObject *self, PyObject *args) |
static PyObject * | array_tolist (PyArrayObject *self, PyObject *args) |
static PyObject * | array_tostring (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_tofile (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_toscalar (PyArrayObject *self, PyObject *args) |
static PyObject * | array_setscalar (PyArrayObject *self, PyObject *args) |
static PyObject * | array_setasflat (PyArrayObject *self, PyObject *args) |
NPY_NO_EXPORT const char * | npy_casting_to_string (NPY_CASTING casting) |
static PyObject * | array_astype (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_wraparray (PyArrayObject *self, PyObject *args) |
static PyObject * | array_preparearray (PyArrayObject *self, PyObject *args) |
static PyObject * | array_getarray (PyArrayObject *self, PyObject *args) |
static PyObject * | array_copy (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_resize (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_repeat (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_choose (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_sort (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_argsort (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_searchsorted (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static void | _deepcopy_call (char *iptr, char *optr, PyArray_Descr *dtype, PyObject *deepcopy, PyObject *visit) |
static PyObject * | array_deepcopy (PyArrayObject *self, PyObject *args) |
static PyObject * | _getlist_pkl (PyArrayObject *self) |
static int | _setlist_pkl (PyArrayObject *self, PyObject *list) |
static PyObject * | array_reduce (PyArrayObject *self, PyObject *NPY_UNUSED(args)) |
static PyObject * | array_setstate (PyArrayObject *self, PyObject *args) |
NPY_NO_EXPORT int | PyArray_Dump (PyObject *self, PyObject *file, int protocol) |
NPY_NO_EXPORT PyObject * | PyArray_Dumps (PyObject *self, int protocol) |
static PyObject * | array_dump (PyArrayObject *self, PyObject *args) |
static PyObject * | array_dumps (PyArrayObject *self, PyObject *args) |
static PyObject * | array_transpose (PyArrayObject *self, PyObject *args) |
static int | _get_type_num_double (PyArray_Descr *dtype1, PyArray_Descr *dtype2) |
static PyObject * | array_mean (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_sum (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_cumsum (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_prod (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_cumprod (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_dot (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_any (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_all (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_stddev (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_variance (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_compress (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_nonzero (PyArrayObject *self, PyObject *args) |
static PyObject * | array_trace (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_clip (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_conjugate (PyArrayObject *self, PyObject *args) |
static PyObject * | array_diagonal (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_flatten (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_ravel (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_round (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_setflags (PyArrayObject *self, PyObject *args, PyObject *kwds) |
static PyObject * | array_newbyteorder (PyArrayObject *self, PyObject *args) |
Variables | |
NPY_NO_EXPORT PyMethodDef | array_methods [] |
#define _ARET | ( | x | ) | PyArray_Return((PyArrayObject *)(x)) |
#define _CHKTYPENUM | ( | typ | ) | ((typ) ? (typ)->type_num : PyArray_NOTYPE) |
#define _MULTIARRAYMODULE |
#define NPY_NO_DEPRECATED_API |
#define NPY_NO_PREFIX |
#define PY_SSIZE_T_CLEAN |
static void _deepcopy_call | ( | char * | iptr, |
char * | optr, | ||
PyArray_Descr * | dtype, | ||
PyObject * | deepcopy, | ||
PyObject * | visit | ||
) | [static] |
static int _get_type_num_double | ( | PyArray_Descr * | dtype1, |
PyArray_Descr * | dtype2 | ||
) | [static] |
Referenced by array_cumsum().
static PyObject* _getlist_pkl | ( | PyArrayObject * | self | ) | [static] |
static int _setlist_pkl | ( | PyArrayObject * | self, |
PyObject * | list | ||
) | [static] |
static PyObject* array_all | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_round().
static PyObject* array_any | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_argmax | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_setflags().
static PyObject* array_argmin | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_setflags().
static PyObject* array_argsort | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_setflags().
static PyObject* array_astype | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_setflags().
static PyObject* array_byteswap | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
References NPY_CORDER, PyArray_OrderConverter(), and PyArray_ToString().
Referenced by array_setflags().
static PyObject* array_choose | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_setflags().
static PyObject* array_clip | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
References NPY_ARRAY_UPDATEIFCOPY.
Referenced by array_setflags().
static PyObject* array_compress | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_setflags().
static PyObject* array_conjugate | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
Referenced by array_setflags().
static PyObject* array_copy | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_ravel(), and array_setflags().
static PyObject* array_cumprod | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_setflags().
static PyObject* array_cumsum | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
References __New_PyArray_Std(), _get_type_num_double(), MAX_DIMS, PyArray_AxisConverter(), PyArray_DescrConverter2(), and PyArray_OutputConverter().
Referenced by array_setflags().
static PyObject* array_deepcopy | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
Referenced by array_ravel().
static PyObject* array_diagonal | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_setflags().
static PyObject* array_dot | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
References PyArray_Nonzero().
Referenced by array_setflags().
static PyObject* array_dump | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
Referenced by array_round().
static PyObject* array_dumps | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
Referenced by array_round().
static PyObject* array_fill | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
Referenced by array_setflags().
static PyObject* array_flatten | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_setflags().
static PyObject* array_getarray | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
static PyObject* array_getfield | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_setflags().
static PyObject* array_max | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_setflags().
static PyObject* array_mean | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_newbyteorder().
static PyObject* array_min | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_newbyteorder().
static PyObject* array_newbyteorder | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
References array_mean(), array_min(), array_nonzero(), and array_prod().
static PyObject* array_nonzero | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
Referenced by array_newbyteorder().
static PyObject* array_preparearray | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
static PyObject* array_prod | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Referenced by array_newbyteorder().
static PyObject* array_ptp | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_put | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_ravel | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
References array_copy(), array_deepcopy(), and array_wraparray().
static PyObject* array_reduce | ( | PyArrayObject * | self, |
PyObject * | NPY_UNUSEDargs | ||
) | [static] |
5 arguments
5) a Python object representing the data (a string, or a list or any user-defined object).
Notice because Python does not describe a mechanism to write raw data to the pickle, this performs a copy to a string first
References NPY_ANYORDER, and PyArray_ToString().
static PyObject* array_repeat | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_reshape | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_resize | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_round | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
References array_all(), array_dump(), array_dumps(), and array_setstate().
static PyObject* array_searchsorted | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_setasflat | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
static PyObject* array_setfield | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_setflags | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
References array_argmax(), array_argmin(), array_argsort(), array_astype(), array_byteswap(), array_choose(), array_clip(), array_compress(), array_conjugate(), array_copy(), array_cumprod(), array_cumsum(), array_diagonal(), array_dot(), array_fill(), array_flatten(), array_getfield(), array_max(), array_setasflat(), array_setscalar(), and array_toscalar().
static PyObject* array_setscalar | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
<
Referenced by array_setflags().
static PyObject* array_setstate | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
<
Referenced by array_round().
static PyObject* array_sort | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_squeeze | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
static PyObject* array_stddev | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
References PyArray_Conjugate(), and PyArray_OutputConverter().
static PyObject* array_sum | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_swapaxes | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
References _PyArray_Descr::elsize, Py_TYPE, and PyArray_NewFromDescr().
static PyObject* array_take | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_tofile | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_tolist | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
static PyObject* array_toscalar | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
static PyObject* array_tostring | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_trace | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
References _IsAligned(), and NPY_ARRAY_ALIGNED.
static PyObject* array_transpose | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
static PyObject* array_variance | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_view | ( | PyArrayObject * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
static PyObject* array_wraparray | ( | PyArrayObject * | self, |
PyObject * | args | ||
) | [static] |
NPY_NO_EXPORT const char* npy_casting_to_string | ( | NPY_CASTING | casting | ) |
Referenced by datetime_metadata_divides(), and PyUFunc_ValidateCasting().
static int NpyArg_ParseKeywords | ( | PyObject * | keys, |
const char * | format, | ||
char ** | kwlist, | ||
... | |||
) | [static] |
NPY_NO_EXPORT PyObject* PyArray_Byteswap | ( | PyArrayObject * | self, |
Bool | inplace | ||
) |
<
References PyArrayIterObject_tag::dataptr, and PyArray_ITER_NEXT.
NPY_NO_EXPORT int PyArray_Dump | ( | PyObject * | self, |
PyObject * | file, | ||
int | protocol | ||
) |
NPY_NO_EXPORT PyObject* PyArray_Dumps | ( | PyObject * | self, |
int | protocol | ||
) |
NPY_NO_EXPORT PyObject* PyArray_GetField | ( | PyArrayObject * | self, |
PyArray_Descr * | typed, | ||
int | offset | ||
) |
NPY_NO_EXPORT int PyArray_SetField | ( | PyArrayObject * | self, |
PyArray_Descr * | dtype, | ||
int | offset, | ||
PyObject * | val | ||
) |
NPY_NO_EXPORT PyMethodDef array_methods[] |