Element-wise functionsΒΆ

Element-wise functions applied to input array(s) produce an output array of respective function values computed for every element of input array(s).

abs

Calculates the absolute value for each element x_i of input array x.

acos

Computes inverse cosine for each element x_i for input array x.

acosh

Computes inverse hyperbolic cosine for each element x_i for input array x.

add

Calculates the sum for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

angle

Computes the phase angle (also called the argument) of each element x_i for input array x.

asin

Computes inverse sine for each element x_i for input array x.

asinh

Computes inverse hyperbolic sine for each element x_i for input array x.

atan

Computes inverse tangent for each element x_i for input array x.

atan2

Calculates the inverse tangent of the quotient x1_i/x2_i for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

atanh

Computes hyperbolic inverse tangent for each element x_i for input array x.

bitwise_and

Computes the bitwise AND of the underlying binary representation of each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

bitwise_left_shift

Shifts the bits of each element x1_i of the input array x1 to the left by appending x2_i (i.e., the respective element in the input array x2) zeros to the right of x1_i.

bitwise_invert

Inverts (flips) each bit for each element x_i of the input array x.

bitwise_or

Computes the bitwise OR of the underlying binary representation of each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

bitwise_right_shift

Shifts the bits of each element x1_i of the input array x1 to the right according to the respective element x2_i of the input array x2.

bitwise_xor

Computes the bitwise XOR of the underlying binary representation of each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

cbrt

Computes the cube-root for each element x_i for input array x.

ceil

Returns the ceiling for each element x_i for input array x.

clip

Clips to the range [min_i, max_i] for each element x_i in x.

conj

Computes conjugate of each element x_i for input array x.

copysign

Composes a floating-point value with the magnitude of x1_i and the sign of x2_i for each element of input arrays x1 and x2.

cos

Computes cosine for each element x_i for input array x.

cosh

Computes hyperbolic cosine for each element x_i for input array x.

divide

Calculates the ratio for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

equal

Calculates equality test results for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

exp

Computes the exponential for each element x_i of input array x.

exp2

Computes the base-2 exponential for each element x_i for input array x.

expm1

Computes the exponential minus 1 for each element x_i of input array x.

floor

Returns the floor for each element x_i for input array x.

floor_divide

Calculates the ratio for each element x1_i of the input array x1 with the respective element x2_i of the input array x2 to the greatest integer-value number that is not greater than the division result.

greater

Computes the greater-than test results for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

greater_equal

Computes the greater-than or equal-to test results for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

hypot

Computes the square root of the sum of squares for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

imag

Computes imaginary part of each element x_i for input array x.

isfinite

Test if each element of input array is a finite number.

isinf

Test if each element of input array is an infinity.

isnan

Test if each element of an input array is a NaN.

less

Computes the less-than test results for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

less_equal

Computes the less-than or equal-to test results for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

log

Computes the natural logarithm for each element x_i of input array x.

log1p

Computes the natural logarithm of (1 + x) for each element x_i of input array x.

log2

Computes the base-2 logarithm for each element x_i of input array x.

log10

Computes the base-10 logarithm for each element x_i of input array x.

logaddexp

Calculates the natural logarithm of the sum of exponentials for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

logical_and

Computes the logical AND for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

logical_not

Computes the logical NOT for each element x_i of input array x.

logical_or

Computes the logical OR for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

logical_xor

Computes the logical XOR for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

maximum

Compares two input arrays x1 and x2 and returns a new array containing the element-wise maxima.

minimum

Compares two input arrays x1 and x2 and returns a new array containing the element-wise minima.

multiply

Calculates the product for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

negative

Computes the numerical negative for each element x_i of input array x.

nextafter

Calculates the next floating-point value after element x1_i of the input array x1 toward the respective element x2_i of the input array x2.

not_equal

Calculates inequality test results for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

positive

Computes the numerical positive for each element x_i of input array x.

pow

Calculates x1_i raised to x2_i for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

proj

Computes projection of each element x_i for input array x.

real

Computes real part of each element x_i for input array x.

remainder

Calculates the remainder of division for each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

reciprocal

Computes the reciprocal of each element x_i for input array x.

round

Rounds each element x_i of the input array x to the nearest integer-valued number.

rsqrt

Computes the reciprocal square-root for each element x_i for input array x.

sign

Computes an indication of the sign of each element x_i of input array x using the signum function.

signbit

Computes an indication of whether the sign bit of each element x_i of input array x is set.

sin

Computes sine for each element x_i of input array x.

sinh

Computes hyperbolic sine for each element x_i for input array x.

square

Squares each element x_i of input array x.

sqrt

Computes the positive square-root for each element x_i of input array x.

subtract

Calculates the difference between each element x1_i of the input array x1 and the respective element x2_i of the input array x2.

tan

Computes tangent for each element x_i for input array x.

tanh

Computes hyperbolic tangent for each element x_i for input array x.

trunc

Returns the truncated value for each element x_i for input array x.