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 "npy_pycompat.h"
#include "ctors.h"
#include "shape.h"
#define _MULTIARRAYMODULE |
#define NPY_NO_DEPRECATED_API NPY_API_VERSION |
#define PY_SSIZE_T_CLEAN |
static int _attempt_nocopy_reshape | ( | PyArrayObject * | self, |
int | newnd, | ||
npy_intp * | newdims, | ||
npy_intp * | newstrides, | ||
int | is_f_order | ||
) | [static] |
<blockquote> with appropriate strides</blockquote>
static int _check_ones | ( | PyArrayObject * | self, |
int | newnd, | ||
npy_intp * | newdims, | ||
npy_intp * | strides | ||
) | [static] |
static int _fix_unknown_dimension | ( | PyArray_Dims * | newshape, |
npy_intp | s_original | ||
) | [static] |
int _npy_stride_sort_item_comparator | ( | const void * | a, |
const void * | b | ||
) |
References PyArray_SHAPE(), PyArray_STRIDES, and s_intp_abs().
static void _putzero | ( | char * | optr, |
PyObject * | zero, | ||
PyArray_Descr * | dtype | ||
) | [static] |
References NPY_MAXDIMS, PyArray_DIMS, PyArray_NDIM, and PyArray_STRIDES.
Referenced by _check_ones().
NPY_NO_EXPORT PyObject* build_shape_string | ( | npy_intp | n, |
npy_intp * | vals | ||
) |
Referenced by broadcast_strides().
NPY_NO_EXPORT void PyArray_CreateMultiSortedStridePerm | ( | int | narrays, |
PyArrayObject ** | arrays, | ||
int | ndim, | ||
int * | out_strideperm | ||
) |
References NPY_CORDER, and PyArray_Newshape().
NPY_NO_EXPORT void PyArray_CreateSortedStridePerm | ( | int | ndim, |
npy_intp * | shape, | ||
npy_intp * | strides, | ||
npy_stride_sort_item * | out_strideperm | ||
) |
Referenced by allocate_reduce_result(), get_decsrcref_transfer_function(), and PyArray_GetDTypeCopySwapFn().
NPY_NO_EXPORT PyObject* PyArray_Flatten | ( | PyArrayObject * | a, |
NPY_ORDER | order | ||
) |
NPY_NO_EXPORT PyObject* PyArray_Newshape | ( | PyArrayObject * | self, |
PyArray_Dims * | newdims, | ||
NPY_ORDER | order | ||
) |
References NPY_FALSE.
Referenced by PyArray_CreateMultiSortedStridePerm().
NPY_NO_EXPORT PyObject* PyArray_Ravel | ( | PyArrayObject * | arr, |
NPY_ORDER | order | ||
) |
NPY_NO_EXPORT void PyArray_RemoveAxesInPlace | ( | PyArrayObject * | arr, |
npy_bool * | flags | ||
) |
modifying it in place. If an axis flagged for removal has a shape entry bigger than one, this effectively selects index zero for that axis.
For example, this can be used to remove the reduction axes from a reduction result once its computation is complete.
NPY_NO_EXPORT PyObject* PyArray_Reshape | ( | PyArrayObject * | self, |
PyObject * | shape | ||
) |
NPY_NO_EXPORT PyObject* PyArray_Resize | ( | PyArrayObject * | self, |
PyArray_Dims * | newshape, | ||
int | refcheck, | ||
NPY_ORDER | order | ||
) |
NPY_NO_EXPORT PyObject* PyArray_Squeeze | ( | PyArrayObject * | self | ) |
Referenced by array_squeeze().
NPY_NO_EXPORT PyObject* PyArray_SqueezeSelected | ( | PyArrayObject * | self, |
npy_bool * | axis_flags | ||
) |
NPY_NO_EXPORT PyObject* PyArray_SwapAxes | ( | PyArrayObject * | ap, |
int | a1, | ||
int | a2 | ||
) |
NPY_NO_EXPORT PyObject* PyArray_Transpose | ( | PyArrayObject * | ap, |
PyArray_Dims * | permute | ||
) |
Referenced by PyArray_ArgMax().
static NPY_INLINE npy_intp s_intp_abs | ( | npy_intp | x | ) | [static] |
References NPY_ANYORDER, NPY_CORDER, NPY_FORTRANORDER, NPY_KEEPORDER, PyArray_Dims::ptr, PyArray_IS_C_CONTIGUOUS, PyArray_IS_F_CONTIGUOUS, and PyArray_ISFORTRAN.
Referenced by _npy_stride_sort_item_comparator().