Dec-09-2022, 05:43 PM
In numpy you can use
np.tril(x)
to extract the lower triangular matrix of an array x
. However, I am interested in extracting the lower (upper) antitriangular matrix, that is, with zeros above (below) the antidiagonal. Is there a way to do this in python?