
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 10744 Articles

AmitDiwan
207 Views
To return the lower triangle of an array, use the numpy.tril() method in Python Numpy. The 1st parameter is the input array. The function returns a copy of an array with elements above the k-th diagonal zeroed. For arrays with ndim exceeding 2, tril will apply to the final two ... Read More

AmitDiwan
2K+ 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
222 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
700 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
195 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
535 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
190 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
3K+ 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
3K+ 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
443 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