saiunit.lax module#
Unit-aware wrappers for jax.lax primitives.
This subpackage mirrors jax.lax but automatically tracks physical units
through low-level operations such as slicing, scattering, convolutions,
and element-wise primitives.
Functions that Accepting Unitless#
Elementwise arc cosine: \(\mathrm{acos}(x)\). |
|
Elementwise inverse hyperbolic cosine: \(\mathrm{acosh}(x)\). |
|
Elementwise arc sine: \(\mathrm{asin}(x)\). |
|
Elementwise inverse hyperbolic sine: \(\mathrm{asinh}(x)\). |
|
Elementwise arc tangent: \(\mathrm{atan}(x)\). |
|
Elementwise inverse hyperbolic tangent: \(\mathrm{atanh}(x)\). |
|
Collapses dimensions of an array into a single dimension. |
|
Compute a cumulative logsumexp along |
|
Exponentially scaled modified Bessel function of order 0: \(\mathrm{i0e}(x) = e^{-|x|} \mathrm{i0}(x)\). |
|
Exponentially scaled modified Bessel function of order 1: \(\mathrm{i1e}(x) = e^{-|x|} \mathrm{i1}(x)\). |
|
Elementwise digamma: \(\psi(x)\). |
|
Elementwise log gamma: \(\mathrm{log}(\Gamma(x))\). |
|
Elementwise error function: \(\mathrm{erf}(x)\). |
|
Elementwise complementary error function: \(\mathrm{erfc}(x) = 1 - \mathrm{erf}(x)\). |
|
Elementwise inverse error function: \(\mathrm{erf}^{-1}(x)\). |
|
Elementwise logistic (sigmoid) function: \(\frac{1}{1 + e^{-x}}\). |
|
Elementwise arc tangent of two variables: \(\mathrm{atan}({x \over y})\). |
|
Elementwise polygamma: \(\psi^{(m)}(x)\). |
|
Elementwise regularized incomplete gamma function. |
|
Elementwise complementary regularized incomplete gamma function. |
|
Elementwise derivative of the regularized incomplete gamma function. |
|
Elementwise derivative of samples from |
|
Elementwise Hurwitz zeta function: \(\zeta(x, q)\). |
|
Elementwise regularized incomplete beta integral. |
|
Elementwise left shift: \(x \ll y\). |
|
Elementwise arithmetic right shift: \(x \gg y\). |
|
Elementwise logical right shift: \(x \gg y\). |
|
Compute a fast Fourier transform. |
|
Collapses dimensions of an array into a single dimension. |
Array Creation Functions#
Create a zero-filled array with the same shape and dtype as |
|
Create an iota array (integer sequence) with an optional unit. |
|
Broadcast an iota array into the given shape along one dimension. |
Functions that Changing Unit#
Elementwise reciprocal square root: \(1 \over \sqrt{x}\). |
|
Elementwise division: \(x \over y\). |
|
Elementwise power: \(x^y\). |
|
Elementwise integer power: \(x^y\), where \(y\) is a fixed integer. |
|
Elementwise multiplication: \(x \times y\). |
|
Elementwise remainder: \(x \bmod y\). |
|
Batch matrix multiplication. |
|
Convenience wrapper around |
|
Convenience wrapper for calculating the N-d convolution "transpose". |
|
General dot product/contraction operator. |
Functions that Keeping Unit#
Wraps XLA's Slice operator. |
|
Wraps XLA's DynamicSlice operator. |
|
Wraps XLA's DynamicUpdateSlice operator. |
|
Gather operator. |
|
Take elements from an array at the given indices along the given axes. |
|
Convenience wrapper around |
|
Convenience wrapper around |
|
Convenience wrapper around |
|
Convenience wrapper around dynamic_slice to perform int indexing. |
|
Convenience wrapper around |
|
Convenience wrapper around |
|
Wraps XLA's Sort operator. |
|
Sort |
|
Elementwise negation: \(-x\). |
|
Compute a cumulative maximum along |
|
Compute a cumulative minimum along |
|
Compute a cumulative sum along |
|
Scatter-update operator. |
|
Scatter-add operator. |
|
Scatter-sub operator. |
|
Scatter-multiply operator. |
|
Scatter-min operator. |
|
Scatter-max operator. |
|
Scatter-apply operator. |
|
Elementwise subtraction: \(x - y\). |
|
Elementwise make complex number: \(x + jy\). |
|
Applies low, high, and/or interior padding to an array. |
|
Elementwise clamp. |
|
Elementwise cast. |
|
Elementwise bitcast. |
|
Returns max |
|
Returns min |
|
Returns top |
|
Broadcast an array by adding new leading dimensions. |
|
Broadcast an array into a target shape (XLA BroadcastInDim). |
|
Add leading dimensions of size 1 to give |
Functions that Removing Unit#
Elementwise popcount: count the number of set bits in each element. |
|
Elementwise count of leading zeros. |
|
Elementwise equals: \(x = y\). |
|
Elementwise not-equals: \(x \neq y\). |
|
Elementwise greater-than-or-equals: \(x \geq y\). |
|
Elementwise greater-than: \(x > y\). |
|
Elementwise less-than-or-equals: \(x \leq y\). |
|
Elementwise less-than: \(x < y\). |
Linalg Functions#
Cholesky decomposition. |
|
Eigendecomposition of a general matrix. |
|
Eigendecomposition of a Hermitian matrix. |
|
Reduce a square matrix to upper Hessenberg form. |
|
LU decomposition with partial pivoting. |
|
Polar decomposition via QR-based dynamically weighted Halley iteration. |
|
QR decomposition. |
|
Schur decomposition. |
|
Singular value decomposition. |
|
Reduce a symmetric/Hermitian matrix to tridiagonal form. |
|
Product of elementary Householder reflectors. |
|
Triangular solve. |
|
Solve a tridiagonal linear system. |
Other Functions#
Reduce an array along dimensions using a computation. |
|
Reduce the precision of array elements. |
|
Return the shape that results from NumPy broadcasting of |