ferray-numpy-interop
Zero-copy conversions between ferray arrays and Python/Arrow/Polars for the ferray scientific computing library.
What's in this crate
- NumPy (feature
python):AsFerrayandIntoNumPytraits via PyO3 - Apache Arrow (feature
arrow):FromArrow/ToArrowtraits +RecordBatchround-trip + null/missing handling - Polars (feature
polars):FromPolars/ToPolarsDataFrame round-trip - Dtype coverage: f32/f64, i8-i128, u8-u128, bool, f16, bf16, complex, complex — all with dtype validation on conversion
DynArrayintegration: convertArray<T, IxDyn>to/from PyArrayDyn / Arrow dynamic-typed columns- Zero-copy when arrays are C-contiguous, safe copy otherwise
All backends are feature-gated and disabled by default.
Usage
[]
= "0.1"
= ["python"] # or "arrow", "polars"
use ;
use *;
use PyReadonlyArray1;
This crate is re-exported through the main ferray crate with the numpy feature.
License
MIT OR Apache-2.0