ndarray integration for plotkit.
This crate activates ndarray support in plotkit-core, providing
IntoSeries implementations for
common ndarray one-dimensional array types. Depend on this crate (or
enable the ndarray feature on the plotkit umbrella crate) to pass
ndarray arrays directly to any plotkit charting function.
Supported types
| Type | Conversion |
|---|---|
&Array1<f64> / Array1<f64> |
zero-copy (contiguous slice borrow) |
ArrayView1<'_, f64> |
zero-copy when contiguous, O(n) copy when strided |
&Array1<f32> / Array1<f32> |
O(n) widening cast |
&Array1<i32> / Array1<i32> |
O(n) cast to f64 |
&Array1<i64> / Array1<i64> |
O(n) cast to f64 |
ArrayView1<'_, f32/i32/i64> |
O(n) cast to f64 |
Examples
use array;
use IntoSeries;
let arr = array!;
let series = .into_series;
assert_eq!;