Skip to content

mohu-array/src/array.rs is empty — core NdArray<T> type not implemented #10

Description

@Bbn08

crates/mohu-array/src/array.rs contains a single empty line. The typed N-dimensional array wrapper (NdArray<T>) that should sit above Buffer and provide the primary user-facing Rust API does not exist.

Buffer handles raw bytes, dtype, layout and strides but has no generic type parameter. All methods on Buffer (e.g. as_slice::<T>, get::<T>) require callers to specify the type at every call site. NdArray<T> is the layer that fixes T at construction and provides ergonomic element access, arithmetic operators, and Display.

Minimum scope:

pub struct NdArray<T: Scalar> {
    buffer: Buffer,
    _marker: PhantomData<T>,
}

with Deref<Target = Buffer>, typed constructors (zeros, ones, from_vec), and Index/IndexMut implementations.

File: crates/mohu-array/src/array.rs (currently 1 line)

Signed-off-by: mohu-org atrancendentbeing@gmail.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions