blob: bef386ed136fb7f382470e696f357110d0a2892f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#ifndef NUMPY_CORE_SRC_MULTIARRAY_SHAPE_H_
#define NUMPY_CORE_SRC_MULTIARRAY_SHAPE_H_
/*
* Creates a sorted stride perm matching the KEEPORDER behavior
* of the NpyIter object. Because this operates based on multiple
* input strides, the 'stride' member of the npy_stride_sort_item
* would be useless and we simply argsort a list of indices instead.
*
* The caller should have already validated that 'ndim' matches for
* every array in the arrays list.
*/
NPY_NO_EXPORT void
PyArray_CreateMultiSortedStridePerm(int narrays, PyArrayObject **arrays,
int ndim, int *out_strideperm);
/*
* Just like PyArray_Squeeze, but allows the caller to select
* a subset of the size-one dimensions to squeeze out.
*/
NPY_NO_EXPORT PyObject *
PyArray_SqueezeSelected(PyArrayObject *self, npy_bool *axis_flags);
#endif /* NUMPY_CORE_SRC_MULTIARRAY_SHAPE_H_ */
|