- 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
106 Views
To return the minimum of an array or minimum ignoring any NaNs, use the numpy.nanmin() method in Python. The method returns an array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, an ndarray scalar is returned. The same dtype as a is returned.The 1st parameter, a is an array containing numbers whose minimum is desired. If a is not an array, a conversion is attempted.The 2nd parameter, axis is an axis or axes along which the minimum is computed. The default is to compute the minimum ... Read More
4K+ Views
To return the minimum of an array or minimum ignoring any NaNs, use the numpy.nanmin() method in Python. The method returns an array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, an ndarray scalar is returned. The same dtype as a is returned. The 1st parameter, a is an array containing numbers whose minimum is desired. If a is not an array, a conversion is attempted.The 2nd parameter, axis is an axis or axes along which the minimum is computed. The default is to compute the ... Read More
588 Views
To return the maximum of an array or maximum ignoring any NaNs, use the numpy.nanmax() method in Python. The method returns an array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, an ndarray scalar is returned. The same dtype as a is returned. The 1st parameter, a is an array containing numbers whose maximum is desired. If a is not an array, a conversion is attempted.The 2nd parameter, axis is an axis or axes along which the maximum is computed. The default is to compute the ... Read More
134 Views
To return the angle of the complex argument, use the numpy.angle() method in Python. The method returns the counterclockwise angle from the positive real axis on the complex plane in the range (-pi, pi], with dtype as numpy.float64. The 1st parameter z, A complex number or sequence of complex numbers. The 2nd parameter, deg, return angle in degrees if True, radians if False (default).StepsAt first, import the required libraries −import numpy as npCreate an array using the array() method −arr = np.array([1.0, 1.0j, 1+1j]) Display the array −print("Array...", arr)Get the type of the array −print("Our Array type...", arr.dtype) Get the ... Read More
2K+ Views
To return the angle of the complex argument, use the numpy.angle() method in Python. The method returns the counterclockwise angle from the positive real axis on the complex plane in the range (-pi, pi], with dtype as numpy.float64. The 1st parameter z, A complex number or sequence of complex numbers. The 2nd parameter, deg, return angle in degrees if True, radians if False (default).StepsAt first, import the required libraries −import numpy as npCreate an array using the array() method −arr = np.array([1.0, 1.0j, 1+1j]) Display the array −print("Array...", arr)Get the type of the array −print("Our Array type...", arr.dtype) Get the ... Read More
145 Views
To return the bases when first array elements are raised to powers from second array, use the float_power() method in Python Numpy. The method returns the bases in x1 raised to the exponents in x2. This is a scalar if both x1 and x2 are scalars. The parameter x1 are the bases. The parameter x2 are the exponents.Raise each base in x1 to the positionally-corresponding power in x2. x1 and x2 must be broadcastable to the same shape. This differs from the power function in that integers, float16, and float32 are promoted to floats with a minimum precision of float64 ... Read More
88 Views
To return the bases when first array elements are raised to powers from second array, use the float_power() method in Python Numpy. The method returns the bases in x1 raised to the exponents in x2. This is a scalar if both x1 and x2 are scalars. The parameter x1 are the bases. The parameter x2 are the exponents.Raise each base in x1 to the positionally-corresponding power in x2. x1 and x2 must be broadcastable to the same shape. This differs from the power function in that integers, float16, and float32 are promoted to floats with a minimum precision of float64 ... Read More
136 Views
To integrate along the given axis using the composite trapezoidal rule, use the numpy.trapz() method. If x is provided, the integration happens in sequence along its elements - they are not sorted. The method returns the definite integral of ‘y’ = n-dimensional array as approximated along a single axis by the trapezoidal rule. If ‘y’ is a 1-dimensional array, then the result is a float. If ‘n’ is greater than 1, then the result is an ‘n-1’ dimensional array.The 1st parameter, y is the input array to integrate. The 2nd parameter, x is the sample points corresponding to the y ... Read More
414 Views
The arctanh is a multivalued function: for each x there are infinitely many numbers z such that tanh(z) = x. The convention is to return the z whose imaginary part lies in [-pi/2, pi/2]. The inverse hyperbolic tangent is also known as atanh or tanh^-1.To compute the inverse Hyperbolic tangent, use the numpy.arctanh() method. The method returns the array of the same shape as x. 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 ... Read More
120 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