numpy 2.0.0
src/multiarray/shape.h
Go to the documentation of this file.
00001 #ifndef _NPY_ARRAY_SHAPE_H_
00002 #define _NPY_ARRAY_SHAPE_H_
00003 
00004 typedef struct {
00005     npy_intp perm, stride;
00006 } _npy_stride_sort_item;
00007 
00008 /*
00009  * This function populates the first PyArray_NDIM(arr) elements
00010  * of strideperm with sorted descending by their absolute values.
00011  * For example, the stride array (4, -2, 12) becomes
00012  * [(2, 12), (0, 4), (1, -2)].
00013  */
00014 NPY_NO_EXPORT void
00015 PyArray_CreateSortedStridePerm(PyArrayObject *arr,
00016                            _npy_stride_sort_item *strideperm);
00017 
00018 #endif