1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Core shared types and utilities for the `nabled` workspace.
//!
//! `nabled-core` is the common substrate used by `nabled-linalg` and
//! `nabled-ml`. It intentionally stays lightweight and focused on:
//!
//! 1. Shared error taxonomy (`ShapeError`, `NabledError`, `IntoNabledError`).
//! 2. Reusable shape/validation helpers over ndarray inputs.
//! 3. Prelude exports for ndarray and complex number types.
//!
//! # Main Modules
//!
//! 1. [`errors`]: shared error contracts used across workspace crates.
//! 2. [`validation`]: reusable ndarray validation helpers.
//! 3. [`prelude`]: common array/scalar and complex-number type exports.
//! 4. [`scalar`]: shared real-scalar trait bounds (`f32`/`f64`).
//!
//! # Example
//!
//! ```rust
//! use ndarray::{arr1, arr2};
//! use nabled_core::validation::validate_square_system;
//!
//! let a = arr2(&[[2.0_f64, 1.0], [1.0, 2.0]]);
//! let b = arr1(&[1.0_f64, 1.0]);
//! validate_square_system(&a, &b)?;
//! # Ok::<(), nabled_core::errors::ShapeError>(())
//! ```