An immutable two-dimensional, mixed-type sparse array with functional vector semantics.
Remarks
IRange is a persistent data structure — all operations return new ranges
via structural sharing. This allows for zero-copy cache-friendly writes, SIMD optimized
reads, and lockless concurrent evaluation.
Designed to ensure familiarity for NumPy and JAX-ML users.
5 primitives are the core methods that have direct access to internal state.
entries() — iterator with sparse/dense, axis, direction, and coercible options.
sparseBuilder() — streaming writer for sparse output construction.
getShape() — returns { rows, columns }.
resize() — returns a new IRange at a different shape with a fill value.
getType() — the scalar type used for default coercion if set.
6 additional methods have been highly optimized for performance.
getValueAt(row, column) — fast random access to individual cells.
fill() — smart vector compression, zero copy.
fillEmpty() — virtual update for empty.
clone() — creates a deep copy of the range.
getStats() — returns range statistics.
hasError() — exact error-member existence, raw untyped read.
errors() is composed from the primitives but may be accelerated by implementations.
All other methods — including mask, choose, select, tile, repeat, and the rest of the
utility surface are composed entirely in terms of those primitives with no special internal access.
An immutable two-dimensional, mixed-type sparse array with functional vector semantics.
Remarks
IRange is a persistent data structure — all operations return new ranges via structural sharing. This allows for zero-copy cache-friendly writes, SIMD optimized reads, and lockless concurrent evaluation.
Designed to ensure familiarity for NumPy and JAX-ML users.
5 primitives are the core methods that have direct access to internal state.
6 additional methods have been highly optimized for performance.
errors()is composed from the primitives but may be accelerated by implementations.All other methods — including
mask,choose,select,tile,repeat, and the rest of the utility surface are composed entirely in terms of those primitives with no special internal access.See
Interface
IRange