cupy.triu¶
- cupy.triu(m, k=0)[source]¶
Returns an upper triangle of an array.
- Parameters
m (array-like) – Array or array-like object.
k (int) – The diagonal below which to zero elements. Zero is the main diagonal, a positive value is above it, and a negative value is below.
- Returns
An upper triangle of an array.
- Return type
See also