- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 11360 Articles
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
1K+ Views
To create an array with zero above the main diagonal forming a lower triangular matrix, use the numpy.tri() method in Python Numpy. The 1st parameter is the number of rows in the array. The 2nd parameter is the number of columns in the array.The tri() function returns an array with ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
160 Views
To create an array with ones below the main diagonal and zeros elsewhere, use the numpy.tri() method in Python NumpyThe 1st parameter is the number of rows in the arrayThe 2nd parameter is the number of columns in the arrayThe 3rd parameter 'k' is the sub-diagonal at and below which ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
589 Views
To create an array with ones above the main diagonal and zeros elsewhere, use the numpy.tri() method in Python NumpyThe 1st parameter is the number of rows in the arrayThe 2nd parameter is the number of columns in the arrayThe 3rd parameter 'k' is the sub-diagonal at and below which ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
129 Views
To return a new array of given shape and type, filled with a fill value, use the numpy.full() method in Python Numpy. The 1st parameter is the shape of the new array. The 2nd parameter sets the fill value as array-like.The dtype is the desired data-type for the array. The ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
403 Views
To return a new array of given shape and type, filled with a fill value, use the numpy.full() method in Python Numpy. The 1st parameter is the shape of the new array. The 2nd parameter sets the fill value.The dtype is the desired data-type for the array. The order suggests ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
121 Views
To return an array of zeroes with the same shape as a given array but with a different type, use the numpy.zeros_like() method in Python Numpy. The 1st parameter here is the shape and data-type of array-like that define these same attributes of the returned array. The 2nd parameter is ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
2K+ Views
To return an array of zeros with the same shape and type as a given array, use the numpy.zeroes_like() method in Python Numpy. The 1st parameter here is the shape and data-type of array-like that define these same attributes of the returned array.The dtype overrides the data type of the ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
2K+ Views
To return a new array of given shape and type, filled with zeros, use the np.zeros() method in Python Numpy. The 1st parameter sets the shape of the array. The 2nd parameter is the desired data-type for the array.The dtype is the desired data-type for the array, e.g., numpy.int8. Default is ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
345 Views
To return an array of ones with the same shape and type as a given array, use the numpy.ones_like() method in Python Numpy. The 1st parameter here is the shape and data-type of array-like that define these same attributes of the returned array.The dtypes overrides the data type of the ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
97 Views
To return a new array of given shape and type, filled with ones, use the numpy.ones() method in Python Numpy. The 1st parameter sets the number of rows. The 2nd parameter sets the number of columns. Both 1st and 2nd parameters forms the shape of the array. The "dtype" parameter ... Read More