
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
Syed Abeed has Published 40 Articles

Syed Abeed
897 Views
numpy.meshgrid() is used to return coordinate matrices from coordinate vectors. Its syntax is as follows −numpy.meshgrid(*xi, **kwargs)ParametersMeshgrid can accept the following parameters −x1, x2, …, xn − It represents the coordinates of a grid.indexing − It is an optional parameter which defines the Cartesian 'xy' by default and matrix 'ij' ... Read More

Syed Abeed
496 Views
numpy.reshape() gives a new shape to an array without changing its data. Its syntax is as follows −numpy.reshape(arr, newshape, order='C')Parametersnumpy.reshape() can accept the following parameters −arr − Input array.shape − endpoint of the sequencenewshape − If an integer, then the result it will be a 1-D array of that length, ... Read More

Syed Abeed
536 Views
numpy.geomspace() returns a set of numbers spaced evenly on a log scale (a geometric progression).Linspace − It is similar to geomspace, but endpoints specified using the log and base.Logspace − It is similar to geomspace, but endpoints specified with arithmetic instead of geometric progression.Syntaxnumpy.goemspace(start, stop, num = 50, endpoint = ... Read More

Syed Abeed
391 Views
numpy.logspace returns a set of numbers spaced evenly on a log scale. Its syntax is as follows −numpy.logspace(start, stop, num = 50, endpoint = True/False, base = 10.0, dtype = None)ParametersThe logspace function can accept the following parameters −start − Start of the sequence; default is zero.stop − Endpoint of ... Read More

Syed Abeed
2K+ Views
The numpy.linspace function is used to create a set of evenly spaced numbers within a defined interval.Syntaxnumpy.linspace(start, stop, num = 50, endpoint = True/False, retstep = False/True, dtype = None)ParametersThe function can accept the following parameters −start − Start of the sequence; by default, it is considered as zero.stop − ... Read More

Syed Abeed
193 Views
The numpy.matrix method is used to interpret a given input as a matrix. It returns a matrix from an array-like object. Its syntax is as follows −numpy.matrix(data, dtype=None, copy=bool)where, data - It is the input data.dtype - It represents the data type of the output matrix.copy - If the input ... Read More

Syed Abeed
475 Views
The numpy.triu() method can be used to get the upper triangle of an array. Its syntax is as follows −Syntaxnumpy.triu(m, k=0)where, m - number of rows in the array.k - It is the diagonal. Use k=0 for the main diagonal. k < 0 is below the main diagonal and k ... Read More

Syed Abeed
288 Views
The numpy.vander() method is used to generate a Vandermonde (Vander) matrix. A Vander matrix contains a geometric progression in each row, for example, $$\mathrm{A =\begin{bmatrix}1 & 2 & 4 \1 & 3 & 9 \1 & 5 &25\end{bmatrix} or\: B = \begin{bmatrix}1 & 4 & 16 \1 & 6 &36 ... Read More

Syed Abeed
281 Views
We can use the numpy.tril() method to get the lower triangle of an array. Its syntax is as followsSyntaxnumpy.tril(m, k=0)where, m - number of rows in the array.k - It is the diagonal. Use k=0 for the main diagonal. k < 0 is below the main diagonal and k > ... Read More

Syed Abeed
317 Views
The numpy.tri method can be used to get an array of 1's at and below a given diagonal and 0's elsewhere.Syntaxnumpy.tri(N, M=None, k=0, dtype=)Parametersnumpy.tri accepts the following parameters −N - It defines the number of the rows in an array.M - It defines the number of columns in an array. ... Read More