numpy 2.0.0
PyArray_ArrFuncs Struct Reference

#include <ndarraytypes.h>

Data Fields

PyArray_VectorUnaryFunc * cast [NPY_NTYPES_ABI_COMPATIBLE]
PyArray_GetItemFunc * getitem
PyArray_SetItemFunc * setitem
PyArray_CopySwapNFunc * copyswapn
PyArray_CopySwapFunc * copyswap
PyArray_CompareFunc * compare
PyArray_ArgFunc * argmax
PyArray_DotFunc * dotfunc
PyArray_ScanFunc * scanfunc
PyArray_FromStrFunc * fromstr
PyArray_NonzeroFunc * nonzero
PyArray_FillFunc * fill
PyArray_FillWithScalarFunc * fillwithscalar
PyArray_SortFunc * sort [NPY_NSORTS]
PyArray_ArgSortFunc * argsort [NPY_NSORTS]
PyObject * castdict
PyArray_ScalarKindFunc * scalarkind
int ** cancastscalarkindto
int * cancastto
PyArray_FastClipFunc * fastclip
PyArray_FastPutmaskFunc * fastputmask
PyArray_FastTakeFunc * fasttake

Field Documentation

Function to select largest Can be NULL

Referenced by PyArray_ArgMax().

PyArray_VectorUnaryFunc* PyArray_ArrFuncs::cast[NPY_NTYPES_ABI_COMPATIBLE]
Functions to cast to most other standard types Can have some NULL entries. The types DATETIME, TIMEDELTA, and HALF go into the castdict even though they are built-in.

Referenced by PyArray_InitArrFuncs().

Dictionary of additional casting functions PyArray_VectorUnaryFuncs which can be populated to support casting to other registered types. Can be NULL

Referenced by PyArray_GetCastFunc(), and PyArray_RegisterCastFunc().

Function to compare items Can be NULL
Copy and/or swap data. Memory areas may not overlap Use memmove first if they might

Referenced by _copyswap().

Function to compute dot product Can be NULL
Used for arange. Can be NULL.
Function to fill arrays with scalar values Can be NULL
Function to read a single value from a string and adjust the pointer; Can be NULL

Referenced by fromstr_next_element().

The next four functions cannot be NULL
Functions to get and set items with standard Python types -- not array scalars

Referenced by array_float(), array_hex(), and array_int().

Function to determine if data is zero or not If NULL a default version is used at Registration time.
Functions useful for generalizing the casting rules. Can be NULL;

Referenced by _signbit_set().

Function to scan an ASCII file and place a single value plus possible separator Can be NULL

Referenced by fromfile_next_element(), and PyArray_Arange().

Sorting functions Can be NULL

The documentation for this struct was generated from the following file: