Skip to main content

Module functions

Module functions 

Source
Expand description

Auto-generated module

🤖 Generated with SplitRS

Functions§

arange
Generate values from start to stop (exclusive) with step step.
detect_npy_dtype
Auto-detect dtype from header and return the NpyDtype.
flat_index
Compute the flat index from multi-dimensional indices (row-major).
linspace
Generate n equally-spaced values from start to stop (inclusive).
logspace
Generate n log-spaced values from 10^start to 10^stop.
matmul
Compute the matrix product C = A * B where A is (m×k) and B is (k×n), both stored as flat row-major f64 slices.
read_npy_f32
Parse a .npy byte buffer and return (shape, f32 data).
read_npy_f64
Parse a .npy byte buffer and return (shape, f64 data).
read_npy_i32
Parse a .npy byte buffer and return (shape, i32 data).
read_npy_i64
Parse a .npy byte buffer and return (shape, i64 data).
read_npy_shape
Auto-detect and return the shape from a .npy byte buffer.
slice_add
Element-wise sum of two equal-length slices.
slice_clip
Clip values to \[lo, hi\].
slice_dot
Dot product of two equal-length slices.
slice_mean
Compute the arithmetic mean of a slice.
slice_min_max
Compute min, max, and their flat indices.
slice_mul
Element-wise product of two equal-length slices.
slice_percentile
Compute the p-th percentile of a slice using linear interpolation.
slice_std
Compute the standard deviation (population, ddof=0).
slice_var
Compute the variance of a slice (population variance, ddof=0).
transpose_2d
Transpose a 2-D row-major matrix stored as a flat Vecf64`.
unravel_index
Compute multi-dimensional indices from a flat index (row-major).
validate_shape
Validate that a shape and data length are consistent.
write_npy_f32
Assemble a complete .npy v1.0 byte sequence for an f32 array.
write_npy_f64
Assemble a complete .npy v1.0 byte sequence for a f64 array.
write_npy_i32
Assemble a complete .npy v1.0 byte sequence for an i32 array.
write_npy_i64
Assemble a complete .npy v1.0 byte sequence for an i64 array.