Skip to content

Releases: mjovanc/numru

v0.2.0

08 Feb 15:44
Compare
Choose a tag to compare
v0.2.0 Pre-release
Pre-release

Changelog

Added

  • Array Structure: Introduced Array<T, D> structure to represent multi-dimensional arrays with elements of type T and dimension D.
  • 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).
  • 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 and MinBuilder for computing maximum and minimum values along specific axes or for the entire array.
  • Unit Tests: Added comprehensive tests for:
    • Array creation for i64 and f64 in 1D, 2D, and 3D.
    • Max and min computations for both data types across dimensions, including axis-specific operations.

v0.1.0

28 Jan 16:06
Compare
Choose a tag to compare
v0.1.0 Pre-release
Pre-release
Updating keywords in Cargo.toml