Expand description
§ferray-numpy-interop
A companion crate providing zero-copy (where possible) conversions between ferray arrays and external array ecosystems:
- NumPy (via PyO3) — feature
"python" - Apache Arrow — feature
"arrow" - Polars — feature
"polars"
All three backends are feature-gated and disabled by default. Enable them
in your Cargo.toml:
[dependencies.ferray-numpy-interop]
version = "0.1"
features = ["arrow"] # or "python", "polars"§Design principles
- Safety first — every conversion validates dtypes and memory layout before returning. No silent reinterpretation of memory.
- Zero-copy when possible — C-contiguous arrays are shared without copying where the target format supports it.
- Explicit errors — dtype mismatches, null values, and unsupported
types produce clear
FerrayErrormessages.
Modules§
- dtype_
map - Mapping between ferray [
DType], Arrow [DataType], and NumPy dtype codes.