Skip to main content

Module math

Module math 

Source
Expand description

Elementary mathematical functions. Element-wise tensor math functions (ufuncs).

Provides both methods on Tensor<T: Float> and free functions mirroring NumPy’s top-level ufuncs (np.sin, np.exp, etc.).

Functions§

abs
Element-wise absolute value.
ceil
Element-wise ceiling.
cos
Element-wise cosine.
exp
Element-wise natural exponential.
floor
Element-wise floor.
ln
Element-wise natural logarithm.
log2
Element-wise base-2 logarithm.
log10
Element-wise base-10 logarithm.
recip
Element-wise reciprocal.
round
Element-wise rounding.
sin
Element-wise sine.
sqrt
Element-wise square root.
tan
Element-wise tangent.