cunumeric.triu_indices_from#

cunumeric.triu_indices_from(arr: ndarray, k: int = 0) tuple[ndarray, ...]#

Return the indices for the upper-triangle of arr.

See cunumeric.triu_indices() for full details.

Parameters:
  • arr (ndarray, shape(N, N)) – The indices will be valid for arrays whose dimensions are the same as arr.

  • k (int, optional) – Diagonal offset (see cunumeric.triu() for details).

Returns:

inds – The indices for the upper-triangle. The returned tuple contains two arrays, each with the indices along one dimension of the array.

Return type:

tuple of arrays

Notes

Availability:

Multiple GPUs, Multiple CPUs