rbc.stdlib.elementwise_functions#

Description

Array API specification for element-wise functions.

https://data-apis.org/array- api/latest/API_specification/elementwise_functions.html.

Functions

abs(a)

Calculates the absolute value for each element x_i of the input array x (i.e., the element-

absolute(a)

NumPy 'absolute' doc

acos(a)

Calculates an implementation-dependent approximation of the principal value of the inverse

acosh(a)

Calculates an implementation-dependent approximation to the inverse hyperbolic cosine, having

add(x1, x2)

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

arccos(a)

NumPy 'arccos' doc

arccosh(a)

NumPy 'arccosh' doc

arcsin(a)

NumPy 'arcsin' doc

arcsinh(a)

NumPy 'arcsinh' doc

arctan(a)

NumPy 'arctan' doc

arctan2(x1, x2)

NumPy 'arctan2' doc

arctanh(a)

NumPy 'arctanh' doc

asin(a)

Calculates an implementation-dependent approximation of the principal value of the inverse

asinh(a)

Calculates an implementation-dependent approximation to the inverse hyperbolic sine, having

atan(a)

Calculates an implementation-dependent approximation of the principal value of the inverse

atan2(x1, x2)

Calculates an implementation-dependent approximation of the inverse tangent of the quotient

atanh(a)

Calculates an implementation-dependent approximation to the inverse hyperbolic tangent, having

bitwise_and(x1, x2)

Computes the bitwise AND of the underlying binary representation of each element x1_iof the

bitwise_invert(a)

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

bitwise_left_shift(x1, x2)

Shifts the bits of each element x1_i of the input array x1 to the left by appending x2_i

bitwise_not(x1, x2)

Computes the bitwise NOR of the underlying binary representation of each element x1_i of the

bitwise_or(x1, x2)

Computes the bitwise OR of the underlying binary representation of each element x1_i of the

bitwise_right_shift(x1, x2)

Shifts the bits of each element x1_i of the input array x1 to the right by appending x2_i

bitwise_xor(x1, x2)

Computes the bitwise XOR of the underlying binary representation of each element x1_i of the

cbrt(a)

❌ Not implemented Array-API 'cbrt' doc

ceil(a)

Rounds each element x_i of the input array x to the smallest (i.e., closest to -infinity)

conj(a)

NumPy 'conj' doc

conjugate(a)

NumPy 'conjugate' doc

copysign(x1, x2)

NumPy 'copysign' doc

cos(a)

Calculates an implementation-dependent approximation to the cosine, having domain

cosh(a)

Calculates an implementation-dependent approximation to the hyperbolic cosine, having

deg2rad(a)

NumPy 'deg2rad' doc

degrees(a)

NumPy 'degrees' doc

divide(x1, x2)

Calculates the division for each element x1_i of the input array x1 with the respective

divmod(x1, x2)

❌ Not implemented Array-API 'divmod' doc

equal(x1, x2)

Computes the truth value of x1_i == x2_i for each element x1_i of the input array x1 with the

exp(a)

Calculates an implementation-dependent approximation to the exponential function, having

exp2(a)

NumPy 'exp2' doc

expm1(a)

Calculates an implementation-dependent approximation to exp(x)-1, having domain [-infinity,

fabs(a)

NumPy 'fabs' doc

float_power(x1, x2)

❌ Not implemented Array-API 'float_power' doc

floor(a)

Rounds each element x_i of the input array x to the greatest (i.e., closest to +infinity)

floor_divide(x1, x2)

Rounds the result of dividing each element x1_i of the input array x1 by the respective

fmax(x1, x2)

NumPy 'fmax' doc

fmin(x1, x2)

NumPy 'fmin' doc

fmod(x1, x2)

NumPy 'fmod' doc

gcd(x1, x2)

NumPy 'gcd' doc

greater(x1, x2)

Computes the truth value of x1_i > x2_i for each element x1_i of the input array x1 with the

greater_equal(x1, x2)

Computes the truth value of x1_i >= x2_i for each element x1_i of the input array x1 with the

heaviside(x1, x2)

NumPy 'heaviside' doc

hypot(x1, x2)

NumPy 'hypot' doc

invert(a)

NumPy 'invert' doc

isfinite(a)

Tests each element x_i of the input array x to determine if finite (i.e., not NaN and not

isinf(a)

Tests each element x_i of the input array x to determine if equal to positive or negative

isnan(a)

Tests each element x_i of the input array x to determine whether the element is NaN.

isnat(a)

❌ Not implemented Array-API 'isnat' doc

lcm(x1, x2)

NumPy 'lcm' doc

ldexp(x1, x2)

NumPy 'ldexp' doc

left_shift(x1, x2)

NumPy 'left_shift' doc

less(x1, x2)

Computes the truth value of x1_i < x2_i for each element x1_i of the input array x1 with the

less_equal(x1, x2)

Computes the truth value of x1_i <= x2_i for each element x1_i of the input array x1 with the

log(a)

Calculates an implementation-dependent approximation to the natural (base e) logarithm, having

log10(a)

Calculates an implementation-dependent approximation to the base 10 logarithm, having

log1p(a)

Calculates an implementation-dependent approximation to log(1+x), where log refers to the

log2(a)

Calculates an implementation-dependent approximation to the base 2 logarithm, having

logaddexp(x1, x2)

Calculates the logarithm of the sum of exponentiations log(exp(x1) + exp(x2)) for each

logaddexp2(x1, x2)

NumPy 'logaddexp2' doc

logical_and(x1, x2)

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

logical_not(a)

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

logical_or(x1, x2)

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

logical_xor(x1, x2)

"Computes the logical XOR for each element x1_i of the input array x1 with the respective

maximum(x1, x2)

NumPy 'maximum' doc

minimum(x1, x2)

NumPy 'minimum' doc

mod(x1, x2)

NumPy 'mod' doc

multiply(x1, x2)

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

negative(a)

Computes the numerical negative of each element x_i (i.e., y_i = -x_i) of the

nextafter(x1, x2)

NumPy 'nextafter' doc

not_equal(x1, x2)

Computes the truth value of x1_i != x2_i for each element x1_i of the input array x1 with the

positive(a)

Computes the numerical positive of each element x_i (i.e., y_i = +x_i) of the

pow(x1, x2)

Calculates an implementation-dependent approximation of exponentiation by raising each element

power(x1, x2)

NumPy 'power' doc

rad2deg(a)

NumPy 'rad2deg' doc

radians(a)

NumPy 'radians' doc

reciprocal(a)

NumPy 'reciprocal' doc

remainder(x1, x2)

Returns the remainder of division for each element x1_i of the input array x1 and the

right_shift(x1, x2)

NumPy 'right_shift' doc

rint(a)

NumPy 'rint' doc

round(a)

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

sign(a)

Returns an indication of the sign of a number for each element x_i of the input array x.

signbit(a)

NumPy 'signbit' doc

sin(a)

Calculates an implementation-dependent approximation to the sine, having domain (-infinity,

sinh(a)

Calculates an implementation-dependent approximation to the hyperbolic sine, having domain.

spacing(a)

NumPy 'spacing' doc

sqrt(a)

Calculates the square root, having domain [0, +infinity] and codomain [0, +infinity], for each

square(a)

Squares (x_i * x_i) each element x_i of the input array x.

subtract(x1, x2)

Calculates the difference for each element x1_i of the input array x1 with the respective

tan(a)

Calculates an implementation-dependent approximation to the tangent, having domain

tanh(a)

Calculates an implementation-dependent approximation to the hyperbolic tangent, having

true_divide(x1, x2)

NumPy 'true_divide' doc

trunc(a)

Rounds each element x_i of the input array x to the integer-valued number that is closest to