Universal Functions (ufunc)
DPNP provides universal functions (a.k.a. ufuncs) to support various elementwise operations.
Available ufuncs
Math operations
Add arguments element-wise. |
|
Subtract arguments, element-wise. |
|
Multiply arguments element-wise. |
|
Divide arguments element-wise. |
|
Calculates |
|
Divide arguments element-wise. |
|
Compute the largest integer smaller or equal to the division of the inputs. |
|
Numerical negative, element-wise. |
|
First array elements raised to powers from second array, element-wise. |
|
Return element-wise remainder of division. |
|
Compute element-wise remainder of division. |
|
Returns the element-wise remainder of division. |
|
Calculate the absolute value element-wise. |
|
Calculate the absolute value element-wise. |
|
Compute the absolute values element-wise. |
|
Round elements of the array to the nearest integer. |
|
Returns an element-wise indication of the sign of a number. |
|
Calculate the exponential, element-wise. |
|
Calculate 2**p for all p in the input array. |
|
Natural logarithm, element-wise. |
|
Return the base 2 logarithm of the input array, element-wise. |
|
Return the base 10 logarithm of the input array, element-wise. |
|
Return the exponential of the input array minus one, element-wise. |
|
Return the natural logarithm of one plus the input array, element-wise. |
|
Returns the projection of a number onto the Riemann sphere. |
|
Return the non-negative square-root of an array, element-wise. |
|
Return the cube-root of an array, element-wise. |
|
Return the element-wise square of the input. |
|
Return the reciprocal of the argument, element-wise. |
|
Computes the reciprocal square-root for each element x_i for input array x. |
Trigonometric functions
Trigonometric sine, element-wise. |
|
Trigonometric cosine, element-wise. |
|
Trigonometric tangent, element-wise. |
|
Inverse sine, element-wise. |
|
Trigonometric inverse cosine, element-wise. |
|
Trigonometric inverse tangent, element-wise. |
|
Element-wise arc tangent of x1/x2 choosing the quadrant correctly. |
|
Given the "legs" of a right triangle, return its hypotenuse. |
|
Hyperbolic sine, element-wise. |
|
Hyperbolic cosine, element-wise. |
|
Compute hyperbolic tangent element-wise. |
|
Inverse hyperbolic sine, element-wise. |
|
Inverse hyperbolic cosine, element-wise. |
|
Hyperbolic inverse tangent, element-wise. |
|
Convert angles from degrees to radians. |
|
Convert angles from radians to degrees. |
Bit-twiddling functions
Compute the bit-wise AND of two arrays element-wise. |
|
Compute the bit-wise OR of two arrays element-wise. |
|
Compute the bit-wise XOR of two arrays element-wise. |
|
Compute bit-wise inversion, or bit-wise NOT, element-wise. |
|
Shift the bits of an integer to the left. |
|
Shift the bits of an integer to the right. |
Comparison functions
Return the truth value of (x1 > x2) element-wise. |
|
Return the truth value of (x1 >= x2) element-wise. |
|
Return the truth value of (x1 < x2) element-wise. |
|
Return the truth value of (x1 <= x2) element-wise. |
|
Return the truth value of (x1 != x2) element-wise. |
|
Return the truth value of (x1 == x2) element-wise. |
|
Compute the truth value of x1 AND x2 element-wise. |
|
Compute the truth value of x1 OR x2 element-wise. |
|
Compute the truth value of x1 XOR x2 element-wise. |
|
Compute the truth value of NOT x element-wise. |
|
Element-wise maximum of array elements. |
|
Element-wise minimum of array elements. |
|
Element-wise maximum of array elements. |
|
Element-wise minimum of array elements. |
Floating functions
Test element-wise for finiteness (not infinity or not Not a Number). |
|
Test element-wise for positive or negative infinity. |
|
Test element-wise for NaN and return result as a boolean array. |
|
Compute the absolute values element-wise. |
|
Returns element-wise True where signbit is set (less than zero). |
|
Change the sign of x1 to that of x2, element-wise. |
|
Return the fractional and integral parts of an array, element-wise. |
|
Returns the element-wise remainder of division. |
|
Round a number to the nearest integer toward minus infinity. |
|
Compute the ceiling of the input, element-wise. |
|
Compute the truncated value of the input, element-wise. |