numpy  2.0.0
src/multiarray/array_assign.c File Reference
#include <Python.h>
#include <numpy/ndarraytypes.h>
#include "npy_config.h"
#include "npy_pycompat.h"
#include "shape.h"
#include "array_assign.h"
#include "common.h"
#include "lowlevel_strided_loops.h"
#include "mem_overlap.h"

Defines

#define PY_SSIZE_T_CLEAN
#define NPY_NO_DEPRECATED_API   NPY_API_VERSION
#define _MULTIARRAYMODULE

Functions

NPY_NO_EXPORT int broadcast_strides (int ndim, npy_intp *shape, int strides_ndim, npy_intp *strides_shape, npy_intp *strides, char *strides_name, npy_intp *out_strides)
NPY_NO_EXPORT int raw_array_is_aligned (int ndim, char *data, npy_intp *strides, int alignment)
NPY_NO_EXPORT int arrays_overlap (PyArrayObject *arr1, PyArrayObject *arr2)

Define Documentation

#define NPY_NO_DEPRECATED_API   NPY_API_VERSION

Function Documentation

Returns 1 if the arrays have overlapping data, 0 otherwise
NPY_NO_EXPORT int broadcast_strides ( int  ndim,
npy_intp shape,
int  strides_ndim,
npy_intp strides_shape,
npy_intp strides,
char *  strides_name,
npy_intp out_strides 
)
See array_assign.h for parameter documentation
Can't broadcast to fewer dimensions
Process from the end to the start, so that 'strides' and 'out_strides' can point to the same memory.
If it doesn't have dimension one, it must match
New dimensions get a zero stride

References build_shape_string(), PyUString_ConcatAndDel, PyUString_FromFormat, and PyUString_FromString.

NPY_NO_EXPORT int raw_array_is_aligned ( int  ndim,
char *  data,
npy_intp strides,
int  alignment 
)