NumPy | Python Methods and Functions

** numpy.tril (a, k = 0): ** returns a copy of the array with the bottom of the triangle relative to ** k **

** Parameters: **

a:input arrayk:[int, optional, 0 by default] Diagonal we require; k & gt; 0 means diagonal above main diagonal or vice versa.

** Returns :**

Lower triangle of a, having same shape and data-type as a.

` ` |

** Output: **

Main Diagonal elements: [[1 0 0] [63 434 0] [54 54 56]] Diagonal above main Diagonal elements: [[1 21 0 ] [63 434 3] [54 54 56]] Main Diagonal elements: [[0 0 0] [63 0 0] [54 54 0]]

** Links: **

https://docs.scipy.org/doc/numpy/reference /generated/numpy.tril.html#numpy.tril

** Notes: **

These NumPy-Python programs will not run by onlineID, so run them on your systems to study them

This article is provided by ** Mohit Gupta_OMG
**

In the summer of 2008, after three decades of building software in corporate data centers, I walked away from corporate America to take a stab at building a technology company from the ground up based...

10/07/2020

Executing Data Quality Projects: Ten Steps to Quality Data and Trusted Information (TM), 2nd Edition. Execute Data Quality Projects, Second Edition presents a structured yet flexible approach to cr...

28/08/2021

Deep Learning for Coders with fastai and PyTorch: AI Applications Without a PhD. Deep learning is often seen as the exclusive domain of math PhDs and big tech companies. But as this how-to guide sh...

05/09/2021

The series “Studies in Big Data” (SBD) publishes new developments and advances in the various areas of Big Data-quickly and with a high quality. The intent is to cover the theory, research, develo...

10/07/2020

X
# Submit new EBook