Mathematical functionsΒΆ

operator+ identity
operator- opposite
operator+ addition
operator- substraction
operator* multiplication
operator/ division
operator|| logical or
operator&& logical and
operator! logical not
where ternary selection
nonzero indices selection
where indices selection
any return true if any value is truthy
all return true if all the values are truthy
operator< element-wise lesser than
operator<= element-wise less or equal
operator> element-wise greater than
operator>= element-wise greater or equal
operator== expression equality
operator!= expression inequality
equal element-wise equality
not_equal element-wise inequality
abs absolute value
fabs absolute value
fmod remainder of the floating point division operation
remainder signed remainder of the division operation
fma fused multiply-add operation
minimum element-wise minimum
maximum element-wise maximum
fmin element-wise minimum for floating point values
fmax element-wise maximum for floating point values
fdim element-wise positive difference
clip element-wise clipping operation
sign element-wise indication of the sign
exp natural exponential function
exp2 base 2 exponential function
expm1 natural exponential function, minus one
log natural logarithm function
log2 base 2 logarithm function
log10 base 10 logarithm function
log1p natural logarithm of one plus function
pow power function
sqrt square root function
cbrt cubic root function
hypot hypotenuse function
sin sine function
cos cosine function
tan tangent function
asin arc sine function
acos arc cosine function
atan arc tangent function
atan2 arc tangent function, determining quadrants
sinh hyperbolic sine function
cosh hyperbolic cosine function
tanh hyperbolic tangent function
asinh inverse hyperbolic sine function
acosh inverse hyperbolic cosine function
atanh inverse hyperbolic tangent function
erf error function
erfc complementary error function
tgamma gamma function
lgamma natural logarithm of the gamma function
ceil nearest integers not less
floor nearest integers not greater
trunc nearest integers not greater in magnitude
round nearest integers, rounding away from zero
nearbyint nearest integers using current rounding mode
rint nearest integers using current rounding mode
isfinite checks for finite values
isinf checks for infinite values
isnan checks for NaN values
isclose element-wise closeness detection
allclose closeness reduction
sum sum of elements over given axes
prod product of elements over given axes
mean mean of elements over given axes
norm_l0 L0 pseudo-norm over given axes
norm_l1 L1 norm over given axes
norm_sq Squared L2 norm over given axes
norm_l2 L2 norm over given axes
norm_linf Infinity norm over given axes
norm_lp_to_p p_th power of Lp norm over given axes
norm_lp Lp norm over given axes
norm_induced_l1 Induced L1 norm of a matrix
norm_induced_linf Induced L-infinity norm of a matrix