You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users of this library can get the result using both Array and RcArray:
let result1:Array2<f64> = algorithm(a);let result2:RcArray2<f64> = algorithm(a);
However, some algorithm in this crate (e.g. ndarray::linalg::Dot::dot) returns Array,
and thus I try to write a function that convert Array<D> into ArrayBase<S: DataOwned, D> without data copy:
This is an generalization of into_owned and into_shared. This generalize can be compiled, but does not keep its stride.
let a:Array3<f64> = Array::zeros((3,2,4).f());// f-orderlet ans = a.clone();let a:Array3<f64> = generalize(a);// c-orderassert_eq!(a, ans);/// panic!
I cannot find a way to keep strides :< I suspect that I need the strongly typed strides #283
Is it possible to implement it correctly out of this crate? If impossible, please add such function.
The text was updated successfully, but these errors were encountered:
I would like to switch array type to implement a general library
Users of this library can get the result using both
Array
andRcArray
:However, some algorithm in this crate (e.g.
ndarray::linalg::Dot::dot
) returnsArray
,and thus I try to write a function that convert
Array<D>
intoArrayBase<S: DataOwned, D>
without data copy:This is an generalization of
into_owned
andinto_shared
. Thisgeneralize
can be compiled, but does not keep its stride.I cannot find a way to keep strides :< I suspect that I need the strongly typed strides #283
Is it possible to implement it correctly out of this crate? If impossible, please add such function.
The text was updated successfully, but these errors were encountered: