python libraries

numpy.tril() in Python

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

numpy.tril() in Python Read More »

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 »