Indexing RoutinesΒΆ

cupy.c_
cupy.r_
cupy.nonzero Return the indices of the elements that are non-zero.
cupy.where Return elements, either from x or y, depending on condition.
cupy.indices Returns an array representing the indices of a grid.
cupy.ix_ Construct an open mesh from multiple sequences.
cupy.ravel_multi_index Converts a tuple of index arrays into an array of flat indices, applying boundary modes to the multi-index.
cupy.unravel_index Converts array of flat indices into a tuple of coordinate arrays.
cupy.take Takes elements of an array at specified indices along an axis.
cupy.take_along_axis Take values from the input array by matching 1d index and data slices.
cupy.choose
cupy.compress Returns selected slices of an array along given axis.
cupy.diag Returns a diagonal or a diagonal array.
cupy.diagonal Returns specified diagonals.
cupy.extract Return the elements of an array that satisfy some condition.
cupy.select Return an array drawn from elements in choicelist, depending on conditions.
cupy.lib.stride_tricks.as_strided Create a view into the array with the given shape and strides.
cupy.place Change elements of an array based on conditional and input values.
cupy.put Replaces specified elements of an array with given values.
cupy.fill_diagonal Fills the main diagonal of the given array of any dimensionality.
cupy.flatiter Flat iterator object to iterate over arrays.