numpy 2.0.0
src/multiarray/multiarray_tests.c.src File Reference
#include <Python.h>
#include "numpy/ndarrayobject.h"
#include "numpy/npy_3kcompat.h"

Defines

#define RETVAL

Functions

static int copy_ type (PyArrayIterObject *itx, PyArrayNeighborhoodIterObject *niterx, npy_intp *bounds, PyObject **out)
static int copy_object (PyArrayIterObject *itx, PyArrayNeighborhoodIterObject *niterx, npy_intp *bounds, PyObject **out)
static PyObject * test_neighborhood_iterator (PyObject *NPY_UNUSED(self), PyObject *args)
static int copy_double_double (PyArrayNeighborhoodIterObject *itx, PyArrayNeighborhoodIterObject *niterx, npy_intp *bounds, PyObject **out)
static PyObject * test_neighborhood_iterator_oob (PyObject *NPY_UNUSED(self), PyObject *args)
PyMODINIT_FUNC initmultiarray_tests (void)

Variables

static PyMethodDef Multiarray_TestsMethods []

Define Documentation

#define RETVAL

Function Documentation

static int copy_double_double ( PyArrayNeighborhoodIterObject itx,
PyArrayNeighborhoodIterObject niterx,
npy_intp bounds,
PyObject **  out 
) [static]

For each point in itx, copy the current neighborhood into an array which is appended at the output list

static int copy_object ( PyArrayIterObject itx,
PyArrayNeighborhoodIterObject niterx,
npy_intp bounds,
PyObject **  out 
) [static]
PyMODINIT_FUNC initmultiarray_tests ( void  )
static PyObject* test_neighborhood_iterator ( PyObject *  NPY_UNUSEDself,
PyObject *  args 
) [static]

Compute boundaries for the neighborhood iterator
Create the neighborhood iterator

static PyObject* test_neighborhood_iterator_oob ( PyObject *  NPY_UNUSEDself,
PyObject *  args 
) [static]

Compute boundaries for the neighborhood iterator
Create the neighborhood iterator

static int copy_ type ( PyArrayIterObject itx,
PyArrayNeighborhoodIterObject niterx,
npy_intp bounds,
PyObject **  out 
) [static]
TODO:
  • Handle mode
begin repeat
type = double, int# #typenum = NPY_DOUBLE, NPY_INT#

For each point in itx, copy the current neighborhood into an array which is appended at the output list

References PyArrayObject::data, PyArray_ITER_NEXT, PyArray_SimpleNew, PyArrayNeighborhoodIter_Next(), and PyArrayNeighborhoodIter_Reset().

Referenced by BOOL_compare(), BOOL_logical_xor(), BOOL_ones_like(), c(), npy_asinh(), suff(), TIMEDELTA_setitem(), and VOID_copyswap().


Variable Documentation

PyMethodDef Multiarray_TestsMethods[] [static]
Initial value:
 {
    {"test_neighborhood_iterator",
        test_neighborhood_iterator,
        METH_VARARGS, NULL},
    {"test_neighborhood_iterator_oob",
        test_neighborhood_iterator_oob,
        METH_VARARGS, NULL},
    {NULL, NULL, 0, NULL}        
}