Skip to main content

ferray_core/array/
mod.rs

1// ferray-core: Array module — NdArray<T, D> and ownership variants (REQ-1, REQ-3)
2//
3// NdArray wraps ndarray::ArrayBase internally. ndarray is NEVER part of the
4// public API surface.
5
6pub mod aliases;
7pub mod arc;
8pub mod cow;
9pub mod display;
10mod index_impl;
11pub mod introspect;
12pub mod iter;
13pub mod methods;
14pub mod owned;
15pub mod reductions;
16#[cfg(feature = "serde")]
17mod serde_impl;
18pub mod sort;
19pub mod view;
20pub mod view_mut;
21
22/// Flags describing the memory properties of an array.
23///
24/// Mirrors `NumPy`'s `arr.flags` field: a flat collection of independent
25/// boolean memory-layout properties. The names map 1:1 to `NumPy` and are
26/// accessed individually by callers, so a bitfield-style enum would
27/// hurt ergonomics rather than help.
28#[allow(clippy::struct_excessive_bools)]
29#[derive(Debug, Clone, Copy, PartialEq, Eq)]
30pub struct ArrayFlags {
31    /// Whether the data is C-contiguous (row-major).
32    pub c_contiguous: bool,
33    /// Whether the data is Fortran-contiguous (column-major).
34    pub f_contiguous: bool,
35    /// Whether the array owns its data.
36    pub owndata: bool,
37    /// Whether the array is writeable.
38    pub writeable: bool,
39}
40
41// Re-export the main types at this module level for convenience.
42pub use self::arc::ArcArray;
43pub use self::cow::CowArray;
44pub use self::owned::Array;
45pub use self::view::ArrayView;
46pub use self::view_mut::ArrayViewMut;