Mathematical functions#
Trigonometric functions#
|
Elementwise sine function. |
|
Elementwise cosine function. |
|
Elementwise tangent function. |
|
Elementwise inverse-sine function (a.k.a. |
|
Elementwise inverse-cosine function (a.k.a. |
|
Elementwise inverse-tangent function (a.k.a. |
|
Computes the hypoteneous of orthogonal vectors of given length. |
|
Elementwise inverse-tangent of the ratio of two arrays. |
rad2deg(x, /, out=None, *, casting='same_kind', dtype=None) |
|
|
Converts angles from degrees to radians elementwise. |
|
Unwrap by taking the complement of large deltas w.r.t. |
radians(x, /, out=None, *, casting='same_kind', dtype=None) |
|
|
Converts angles from radians to degrees elementwise. |
Hyperbolic functions#
|
Elementwise hyperbolic sine function. |
|
Elementwise hyperbolic cosine function. |
|
Elementwise hyperbolic tangent function. |
|
Elementwise inverse of hyperbolic sine function. |
|
Elementwise inverse of hyperbolic cosine function. |
|
Elementwise inverse of hyperbolic tangent function. |
Rounding#
|
Rounds to the given number of decimals. |
|
|
|
Rounds each element of an array to the nearest integer. |
|
If given value x is positive, it return floor(x). |
|
Rounds each element of an array to its floor integer. |
|
Rounds each element of an array to its ceiling integer. |
|
Rounds each element of an array towards zero. |
Sums, products, differences#
|
Returns the product of an array along given axes. |
|
Returns the sum of an array along given axes. |
|
Returns the product of an array along given axes treating Not a Numbers (NaNs) as zero. |
|
Returns the sum of an array along given axes treating Not a Numbers (NaNs) as zero. |
|
Returns the cumulative product of an array along a given axis. |
|
Returns the cumulative sum of an array along a given axis. |
|
Returns the cumulative product of an array along a given axis treating Not a Numbers (NaNs) as one. |
|
Returns the cumulative sum of an array along a given axis treating Not a Numbers (NaNs) as zero. |
|
Calculate the n-th discrete difference along the given axis. |
|
Return the gradient of an N-dimensional array. |
|
Calculates the difference between consecutive elements of an array. |
|
Returns the cross product of two vectors. |
|
Integrate along the given axis using the composite trapezoidal rule. |
Exponents and logarithms#
|
Elementwise exponential function. |
|
Computes |
|
Elementwise exponentiation with base 2. |
|
Elementwise natural logarithm function. |
|
Elementwise common logarithm function. |
|
Elementwise binary logarithm function. |
|
Computes |
|
Computes |
|
Computes |
Other special functions#
|
Modified Bessel function of the first kind, order 0. |
|
Elementwise sinc function. |
Floating point routines#
|
Tests elementwise if the sign bit is set (i.e. |
|
Returns the first argument with the sign bit of the second elementwise. |
|
Decomposes each element to mantissa and two's exponent. |
|
Computes |
|
Computes the nearest neighbor float values towards the second argument. |
Rational routines#
|
Computes lcm of |
|
Computes gcd of |
Arithmetic operations#
|
Adds two arrays elementwise. |
|
Computes |
|
Takes numerical positive elementwise. |
|
Takes numerical negative elementwise. |
|
Multiplies two arrays elementwise. |
true_divide(x1, x2, /, out=None, *, casting='same_kind', dtype=None) |
|
|
Computes |
|
Subtracts arguments elementwise. |
|
Elementwise true division (i.e. |
|
Elementwise floor division (i.e. |
|
First array elements raised to powers from second array, element-wise. |
|
Computes the remainder of C division elementwise. |
|
Computes the remainder of Python division elementwise. |
|
Extracts the fractional and integral parts of an array elementwise. |
mod(x1, x2, /, out=None, *, casting='same_kind', dtype=None) |
|
|
Handling complex numbers#
|
Returns the angle of the complex argument. |
|
Returns the real part of the elements of the array. |
|
Returns the imaginary part of the elements of the array. |
conjugate(x, /, out=None, *, casting='same_kind', dtype=None) |
|
|
Returns the complex conjugate, element-wise. |
Miscellaneous#
|
Returns the discrete, linear convolution of two one-dimensional sequences. |
|
Clips the values of an array to a given interval. |
|
Elementwise square root function. |
|
Elementwise cube root function. |
|
Elementwise square function. |
|
Elementwise absolute value function. |
|
Calculates absolute values element-wise. |
|
Elementwise sign function. |
|
Takes the maximum of two arrays elementwise. |
|
Takes the minimum of two arrays elementwise. |
|
Takes the maximum of two arrays elementwise. |
|
Takes the minimum of two arrays elementwise. |
|
Replace NaN with zero and infinity with large finite numbers (default behaviour) or with the numbers defined by the user using the nan, posinf and/or neginf keywords. |
|
Compute the Heaviside step function. |
|
If input is complex with all imaginary parts close to zero, return real parts. |
|
One-dimensional linear interpolation. |