jax.scipy.linalg.triu#

jax.scipy.linalg.triu(m, k=0)[source]#

Deprecated since version 1.11.0.

LAX-backend implementation of scipy.linalg._special_matrices.triu().

Original docstring below.

tril is deprecated in favour of numpy.triu and will be removed in

SciPy 1.13.0.

Make a copy of a matrix with elements below the kth diagonal zeroed.

Parameters:
  • m (array_like) – Matrix whose elements to return

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

Returns:

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

Return type:

ndarray