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(x)

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

absolute(x)

NumPy 'absolute' doc

acos(x)

Calculates an implementation-dependent approximation of the principal value of the inverse cosine for each element x_i of the input array x.

acosh(x)

Calculates an implementation-dependent approximation to the inverse hyperbolic cosine for each element x_i of the input array x.

add(x1, x2)

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

arccos(x)

NumPy 'arccos' doc

arccosh(x)

NumPy 'arccosh' doc

arcsin(x)

NumPy 'arcsin' doc

arcsinh(x)

NumPy 'arcsinh' doc

arctan(x)

NumPy 'arctan' doc

arctan2(x1, x2)

NumPy 'arctan2' doc

arctanh(x)

NumPy 'arctanh' doc

asin(x)

Calculates an implementation-dependent approximation of the principal value of the inverse sine for each element x_i of the input array x.

asinh(x)

Calculates an implementation-dependent approximation to the inverse hyperbolic sine for each element x_i in the input array x.

atan(x)

Calculates an implementation-dependent approximation of the principal value of the inverse tangent for each element x_i of the input array x.

atan2(x1, x2)

Calculates an implementation-dependent approximation of the inverse tangent of the quotient x1/x2, having domain [-infinity, +infinity] x [-infinity, +infinity] (where the x notation denotes the set of ordered pairs of elements (x1_i, x2_i)) and codomain [-π, +π], for each pair of elements (x1_i, x2_i) of the input arrays x1 and x2, respectively.

atanh(x)

Calculates an implementation-dependent approximation to the inverse hyperbolic tangent, having domain [-1, +1] and codomain [-infinity, +infinity], for each element x_i of the input array x.

bitwise_and(x1, x2)

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

bitwise_invert(x)

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 (i.e., the respective element in the input array x2) zeros to the right of x1_i.

bitwise_or(x1, x2)

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(x1, x2)

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

bitwise_xor(x1, x2)

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(x)

❌ Not implemented Array-API 'cbrt' doc

ceil(x)

Rounds each element x_i of the input array x to the smallest (i.e., closest to -infinity) integer-valued number that is not less than x_i.

conj(x)

Returns the complex conjugate for each element x_i of the input array

conjugate(x)

NumPy 'conjugate' doc

copysign(x1, x2)

NumPy 'copysign' doc

cos(x)

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

cosh(x)

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

deg2rad(x)

NumPy 'deg2rad' doc

degrees(x)

NumPy 'degrees' doc

divide(x1, x2)

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

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 respective element x2_i of the input array x2.

exp(x)

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

exp2(x)

NumPy 'exp2' doc

expm1(x)

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

fabs(x)

NumPy 'fabs' doc

float_power(x1, x2)

❌ Not implemented Array-API 'float_power' doc

floor(x)

Rounds each element x_i of the input array x to the greatest (i.e., closest to +infinity) integer-valued number that is not greater than x_i.

floor_divide(x1, x2)

Rounds the result of dividing each element x1_i of the input array x1 by the respective element x2_i of the input array x2 to the greatest (i.e., closest to +infinity) integer-value number that is not greater than the division result.

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 respective element x2_i of the input array x2.

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 respective element x2_i of the input array x2.

heaviside(x1, x2)

NumPy 'heaviside' doc

hypot(x1, x2)

NumPy 'hypot' doc

imag(x)

❌ Not implemented

invert(x)

NumPy 'invert' doc

isfinite(x)

Tests each element x_i of the input array x to determine if finite (i.e., not NaN and not equal to positive or negative infinity).

isinf(x)

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

isnan(x)

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

isnat(x)

❌ Not implemented NumPy '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 respective element x2_i of the input array x2.

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 respective element x2_i of the input array x2.

log(x)

Calculates an implementation-dependent approximation to the natural (base e) logarithm, having domain [0, +infinity] and codomain [-infinity, +infinity], for each element x_i of the input array x.

log10(x)

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

log1p(x)

Calculates an implementation-dependent approximation to log(1+x), where log refers to the natural (base e) logarithm, having domain [-1, +infinity] and codomain [-infinity, +infinity], for each element x_i of the input array x.

log2(x)

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 element x1_i of the input array x1 with the respective element x2_i of the input array x2.

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 element x2_i of the input array x2.

logical_not(x)

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 element x2_i of the input array x2.

logical_xor(x1, x2)

"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(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 x2_i of the input array x2.

negative(x)

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 respective element x2_i of the input array x2.

positive(x)

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 x1_i (the base) of the input array x1 to the power of x2_i (the exponent), where x2_i is the corresponding element of the input array x2.

power(x1, x2)

NumPy 'power' doc

rad2deg(x)

NumPy 'rad2deg' doc

radians(x)

NumPy 'radians' doc

real(x)

❌ Not implemented

reciprocal(x)

NumPy 'reciprocal' doc

remainder(x1, x2)

Returns the remainder of division for each element x1_i of the input array x1 and the respective element x2_i of the input array x2.

right_shift(x1, x2)

NumPy 'right_shift' doc

rint(x)

NumPy 'rint' doc

round(x)

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

sign(x)

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

signbit(x)

NumPy 'signbit' doc

sin(x)

Calculates an implementation-dependent approximation to the sine for each element x_i of the input array x.

sinh(x)

Calculates an implementation-dependent approximation to the hyperbolic sine for each element x_i of the input array x.

spacing(x)

NumPy 'spacing' doc

sqrt(x)

Calculates the principal square root for each element x_i of the input array x.

square(x)

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 element x2_i of the input array x2

tan(x)

Calculates an implementation-dependent approximation to the tangent for each element x_i of the input array x.

tanh(x)

Calculates an implementation-dependent approximation to the hyperbolic tangent for each element x_i of the input array x.

true_divide(x1, x2)

NumPy 'true_divide' doc

trunc(x)

Rounds each element x_i of the input array x to the nearest integer-valued number that is closer to zero than x_i.