Indexing RoutinesΒΆ

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.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.diag Returns a diagonal or a diagonal array.
cupy.diagonal Returns specified diagonals.
cupy.lib.stride_tricks.as_strided Create a view into the array with the given shape and strides. 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.