Returns the upper triangular part of a 2-D array, setting elements below the specified diagonal to zero.
Arguments
- operand
(
arrayish)
Operand.- diagonal
(
integer(1))
Diagonal offset.0(default) is the main diagonal, positive values exclude diagonals above, negative values include diagonals below.
Value
arrayish
Has the same shape and data type as operand.