Skip to main content

Module elementwise

Module elementwise 

Source
Expand description

Elementwise kernels with name-based broadcasting and NumPy type promotion.

Functionsยง

abs
|a|, in the input type. abs(i8::MIN) wraps to i8::MIN, like NumPy.
add
a + b. Integer overflow wraps, like NumPy.
arccos
Inverse cosine, like numpy.arccos.
arcsin
Inverse sine, like numpy.arcsin.
arctan
Inverse tangent, like numpy.arctan.
cast
Cast the values, like ndarray.astype. Keeps the attributes.
cbrt
Cube root, like numpy.cbrt.
ceil
Round up, like numpy.ceil.
clip
Limit values to [min, max], like numpy.clip. Keeps the attributes.
cos
Cosine, like numpy.cos.
cosh
Hyperbolic cosine, like numpy.cosh.
deg2rad
Degrees to radians, like numpy.deg2rad.
div
True division a / b, like numpy.true_divide: integers divide as Float64.
eq
a == b.
exp
e^a, like numpy.exp.
expm1
e^a - 1, like numpy.expm1.
fill_null
Replace nulls with value, a length-1 array. Keeps the attributes.
floor
Round down, like numpy.floor.
floor_divide
Floor division a // b, like numpy.floor_divide. Integer division by zero gives null.
ge
a >= b.
gt
a > b.
is_not_null_mask
true where the value is not null.
is_null_mask
true where the value is null.
isfinite
true where the value is finite, like numpy.isfinite.
isinf
true where the value is infinite, like numpy.isinf.
isnan
true where the value is NaN, like numpy.isnan. Nulls stay null.
le
a <= b.
log
Natural logarithm, like numpy.log.
log2
Base-2 logarithm, like numpy.log2.
log1p
ln(1 + a), like numpy.log1p.
log10
Base-10 logarithm, like numpy.log10.
logical_and
Logical AND with Kleene null logic (false AND null is false).
logical_not
Logical NOT.
logical_or
Logical OR with Kleene null logic (true OR null is true).
logical_xor
Logical XOR. A null input gives a null.
lt
a < b.
map_float
Apply a floating point function. Integers compute as Float64, like NumPy.
mod_
Remainder with the sign of b, like numpy.mod (Python %). Integer division by zero gives null.
mul
a * b. Integer overflow wraps, like NumPy.
nan_to_null
Replace NaN with null, so that NaN counts as missing in all kernels.
ne
a != b.
neg
-a. Integer overflow wraps, like NumPy.
pow
a ** b in floating point, like numpy.float_power.
rad2deg
Radians to degrees, like numpy.rad2deg.
rem
Remainder with the sign of a, like numpy.fmod. Integer division by zero is an error.
result_type
The NumPy result type of two numeric types, like numpy.result_type.
round
Round half to even, like numpy.round with zero decimals.
sin
Sine, like numpy.sin.
sinh
Hyperbolic sine, like numpy.sinh.
sqrt
Square root, like numpy.sqrt.
sub
a - b. Integer overflow wraps, like NumPy.
tan
Tangent, like numpy.tan.
tanh
Hyperbolic tangent, like numpy.tanh.
trunc
Round toward zero, like numpy.trunc.
where_
cond ? x : y, like numpy.where. A null condition picks y. Keeps the attributes of x.