- 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
Found 10784 Articles for Python
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
147 Views
To return matrix rank of array using Singular Value Decomposition method, use the numpy.linalg.matrix_rank() method in Python. Rank of the array is the number of singular values of the array that are greater than tol. The 1st parameter, A is the input vector or stack of matrices.The 2nd parameter, tol is the Threshold below which SVD values are considered zero. If tol is None, and S is an array with singular values for M, and eps is the epsilon value for datatype of S, then tol is set to S.max() * max(M, N) * eps. The 3rd parameter, hermitian, If ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
343 Views
The arccosh() is a multivalued function: for each x there are infinitely many numbers z such that cosh(z) = x. The convention is to return the z whose imaginary part lies in [-pi, pi] and the real part in [0, inf]. For real-valued input data types, arccosh always returns real output. For each value that cannot be expressed as a real number or infinity, it yields nan and sets the invalid floating point error flag. For complex-valued input, arccosh is a complex analytical function that has a branch cut [-inf, 1] and is continuous from above on it.To compute the ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
131 Views
To get the Inner product of two arrays, use the numpy.inner() method in Python. Ordinary inner product of vectors for 1-D arrays, in higher dimensions a sum product over the last axes. The parameters are 1 and b, two vectors. If a and b are nonscalar, their last dimensions must match.StepsAt first, import the required libraries -import numpy as npCreating two numpy One-Dimensional array using the array() method −arr1 = np.array([5, 10, 15]) arr2 = np.array([20, 25, 30])Display the arrays −print("Array1...", arr1) print("Array2...", arr2)Check the Dimensions of both the arrays −print("Dimensions of Array1...", arr1.ndim) print("Dimensions of Array2...", arr2.ndim)Check the Shape ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
146 Views
The arcsinh is a multivalued function: for each x there are infinitely many numbers z such that sinh(z) = x. The convention is to return the z whose imaginary part lies in [-pi/2, pi/2]. For real-valued input data types, arcsinh always returns real output. For each value that cannot be expressed as a real number or infinity, it returns nan and sets the invalid floating point error flag.For complex-valued input, arccos is a complex analytical function that has branch cuts [1j, infj] and [- 1j, -infj] and is continuous from the right on the former and from the left on ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
505 Views
To get the Inner product of two multi-dimensional arrays, use the numpy.inner() method in Python. Ordinary inner product of vectors for 1-D arrays, in higher dimensions a sum product over the last axes. The parameters are 1 and b, two vectors. If a and b are nonscalar, their last dimensions must match.StepsAt first, import the required libraries -import numpy as npCreating two numpy Two-Dimensional array using the array() method −arr1 = np.array([[5, 10], [15, 20]]) arr2 = np.array([[6, 12], [18, 24]])Display the arrays −print("Array1...", arr1) print("Array2...", arr2)Check the Dimensions of both the arrays −print("Dimensions of Array1...", arr1.ndim) print("Dimensions of Array2...", ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
704 Views
The arcsinh is a multivalued function: for each x there are infinitely many numbers z such that sinh(z) = x. The convention is to return the z whose imaginary part lies in [-pi/2, pi/2]. For real-valued input data types, arcsinh always returns real output. For each value that cannot be expressed as a real number or infinity, it returns nan and sets the invalid floating point error flag. For complex-valued input, arccos is a complex analytical function that has branch cuts [1j, infj] and [-1j, -infj] and is continuous from the right on the former and from the left on ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
253 Views
To compute the Hyperbolic cosine, use the numpy.cosh() method in Python Numpy. The method is equivalent to 1/2 * (np.exp(x) + np.exp(-x)) and np.cos(1j*x). Returns the corresponding hyperbolic cosine values. This is a scalar if x is a scalar. The 1st parameter, x is input array. The 2nd and 3rd parameters are optional.The 2nd parameter is an ndarray, A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provided or None, a freshly-allocated array is returned. The 3rd parameter is the condition is broadcast over the input. At ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
159 Views
To compute the Hyperbolic sine of the array elements, use the numpy.sinh() method in Python Numpy. The method is equivalent to 1/2 * (np.exp(x) - np.exp(-x)) or -1j * np.sin(1j*x). Returns the corresponding hyperbolic sine values. This is a scalar if x is a scalar. The 1st parameter, x is input array. The 2nd and 3rd parameters are optional.The 2nd parameter is an ndarray, A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provided or None, a freshly-allocated array is returned.The 3rd parameter is the condition is ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
4K+ Views
To convert a radian array to degrees, use the numpy.rad2deg() method in Python Numpy. The method returns the corresponding angle in degrees. This is a scalar if x is a scalar. The 1st parameter is an input angle in radians. The 2nd and 3rd parameters are optional.The 2nd parameter is an ndarray, A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provided or None, a freshly-allocated array is returned.The 3rd parameter is the condition is broadcast over the input. At locations where the condition is True, the ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
130 Views
To compute log-determinants for a stack of matrices, use the numpy.linalg.slogdet() method in Python. The 1st parameter, s is an input array, has to be a square 2-D array. The method, with sign returns a number representing the sign of the determinant. For a real matrix, this is 1, 0, or -1. For a complex matrix, this is a complex number with absolute value 1, or else 0.The method, with logdet returns the natural log of the absolute value of the determinant. If the determinant is zero, then sign will be 0 and logdet will be -Inf. In all cases, ... Read More