cupyx.scipy.linalg.triu

cupyx.scipy.linalg.triu(m, k=0)

Make a copy of a matrix with elements below the k-th diagonal zeroed.

Parameters
  • m (cupy.ndarray) – Matrix whose elements to return

  • k (int, optional) – Diagonal above which to zero elements. k == 0 is the main diagonal, k < 0 subdiagonal and k > 0 superdiagonal.

Returns

Return matrix with zeroed elements below the kth diagonal and has same shape and type as m.

Return type

(cupy.ndarray)