Releases: mjovanc/numru
Releases · mjovanc/numru
v0.2.0
Changelog
Added
- Array Structure: Introduced
Array<T, D>
structure to represent multi-dimensional arrays with elements of typeT
and dimensionD
. - Error Handling: Defined custom error types (
ArrayError
) for various array operations including:DimensionMismatch
IndexOutOfBounds
EmptyArray
DataTypeMismatch
InvalidAxis
UnimplementedDimension
- Dimension Trait: Added
Dimension
trait for describing array dimensions, including methods for number of dimensions (ndim
), total size (size
), and dimension lengths (dims
). - Ix Struct: Implemented
Ix<const N: usize>
for fixed-size index types representing array dimensions. - Shape Struct: Introduced
Shape<D>
to encapsulate array dimensions, providing methods to access the raw dimension, total size, and dimension lengths. - Array Operations: Added methods for:
- Creating new arrays (
new
). - Accessing data and shape (
data
,shape
). - Computing max and min values (
max_compute
,min_compute
) with error handling for different scenarios. - Visualization of arrays (
visualize
).
- Creating new arrays (
- Macro: Implemented
arr!
macro for creating arrays with 1D, 2D, or 3D syntax, which also flattens nested arrays into a vector and records the shape. - Builder Pattern: Introduced
MaxBuilder
andMinBuilder
for computing maximum and minimum values along specific axes or for the entire array. - Unit Tests: Added comprehensive tests for:
- Array creation for
i64
andf64
in 1D, 2D, and 3D. - Max and min computations for both data types across dimensions, including axis-specific operations.
- Array creation for