numpy.triu() in Python

numpy.triu() returns a copy of the array matrix with an element of the upper part of the triangle with respect to k. It returns a copy of array with upper part of triangle and below the kth diagonal zeroed. Syntax: numpy.triu(m,k=0) Parameters: m- number of rows in the array. k-It is optional. Diagonal above which …

numpy.triu() in Python Read More »