numpy.
triu_indices_from
Return the indices for the upper-triangle of arr.
See triu_indices for full details.
triu_indices
The indices will be valid for square arrays.
Diagonal offset (see triu for details).
triu
Indices for the upper-triangle of arr.
See also
Notes
New in version 1.4.0.