Mathematical Functions

Trigonometric functions

dpnp.sin

Trigonometric sine, element-wise.

dpnp.cos

Trigonometric cosine, element-wise.

dpnp.tan

Compute tangent element-wise.

dpnp.arcsin

Inverse sine, element-wise.

dpnp.arccos

Trigonometric inverse cosine, element-wise.

dpnp.arctan

Trigonometric inverse tangent, element-wise.

dpnp.hypot

Given the "legs" of a right triangle, return its hypotenuse.

dpnp.arctan2

Element-wise arc tangent of x1/x2 choosing the quadrant correctly.

dpnp.degrees

Convert angles from radians to degrees.

dpnp.radians

Convert angles from degrees to radians.

dpnp.unwrap

Unwrap by changing deltas between values to 2*pi complement.

dpnp.deg2rad

Convert angles from degrees to radians.

dpnp.rad2deg

Convert angles from radians to degrees.

Hyperbolic functions

dpnp.sinh

Trigonometric hyperbolic sine, element-wise.

dpnp.cosh

Trigonometric hyperbolic cosine, element-wise.

dpnp.tanh

Compute hyperbolic tangent element-wise.

dpnp.arcsinh

Inverse hyperbolic sine, element-wise.

dpnp.arccosh

Trigonometric inverse hyperbolic cosine, element-wise.

dpnp.arctanh

Trigonometric hyperbolic inverse tangent, element-wise.

Rounding

dpnp.around

Evenly round to the given number of decimals.

dpnp.round_

Round an array to the given number of decimals.

dpnp.floor

Round a number to the nearest integer toward minus infinity.

dpnp.ceil

Compute the ceiling of the input, element-wise.

dpnp.trunc

Compute the truncated value of the input, element-wise.

Sums, products, differences

dpnp.prod

Calculate product of array elements over a given axis.

dpnp.sum

Sum of array elements over a given axis.

dpnp.cumprod

Return the cumulative product of elements along a given axis.

dpnp.cumsum

Return the cumulative sum of the elements along a given axis.

dpnp.nancumprod

Return the cumulative product of array elements over a given axis treating Not a Numbers (NaNs) as one.

dpnp.nancumsum

Return the cumulative sum of the elements along a given axis.

dpnp.nansum

Calculate sum() function treating 'Not a Numbers' (NaN) as zero.

dpnp.nanprod

Calculate prod() function treating 'Not a Numbers' (NaN) as ones.

dpnp.cross

Return the cross product of two (arrays of) vectors.

dpnp.diff

Calculate the n-th discrete difference along the given axis.

dpnp.ediff1d

The differences between consecutive elements of an array.

dpnp.gradient

Return the gradient of an array.

dpnp.trapz

Integrate along the given axis using the composite trapezoidal rule.

Exponents and logarithms

dpnp.exp

Trigonometric exponent, element-wise.

dpnp.expm1

Trigonometric exponent minus 1, element-wise.

dpnp.exp2

Trigonometric exponent2, element-wise.

dpnp.log

Trigonometric logarithm, element-wise.

dpnp.log10

Trigonometric logarithm, element-wise.

dpnp.log2

Trigonometric logarithm, element-wise.

dpnp.log1p

Trigonometric logarithm, element-wise.

Other special functions

Floating point routines

dpnp.copysign

Change the sign of x1 to that of x2, element-wise.

Arithmetic operations

dpnp.add

Add arguments element-wise.

dpnp.reciprocal

Return the reciprocal of the argument, element-wise.

dpnp.negative

Negative element-wise.

dpnp.multiply

Multiply arguments element-wise.

dpnp.divide

Divide arguments element-wise.

dpnp.power

First array elements raised to powers from second array, element-wise.

dpnp.subtract

Subtract arguments, element-wise.

dpnp.true_divide

Provide a true division of the inputs, element-wise.

dpnp.floor_divide

Compute the largest integer smaller or equal to the division of the inputs.

dpnp.fmod

Calculate the element-wise remainder of division.

dpnp.mod

Compute element-wise remainder of division.

dpnp.modf

Return the fractional and integral parts of an array, element-wise.

dpnp.remainder

Return element-wise remainder of division.

Handling complex numbers

dpnp.conj

Return the complex conjugate, element-wise.

Miscellaneous

dpnp.convolve

Returns the discrete, linear convolution of two one-dimensional sequences.

dpnp.sqrt

Return the positive square-root of an array, element-wise.

dpnp.cbrt

Return the cube-root of an array, element-wise.

dpnp.square

Return the element-wise square of the input.

dpnp.abs

Calculate the absolute value element-wise.

dpnp.absolute

Calculate the absolute value element-wise.

dpnp.fabs

Compute the absolute values element-wise.

dpnp.sign

Returns an element-wise indication of the sign of a number.

dpnp.maximum

Element-wise maximum of array elements.

dpnp.minimum

Element-wise minimum of array elements.

dpnp.fmax

Element-wise maximum of array elements.

dpnp.fmin

Element-wise minimum of array elements.