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
This is an improvement to reduce Array::mapv calling.
use num_traits::Float;// For Array<Float>impl<A,S,D>ArrayBase<S,D>whereA:Float,S:RawData<Elem = A>,D:Dimension,{pubfnsquare(&self) -> Array<A,D>{self.mapv(|v| v * v)}pubfnsqrt(&self) -> Array<A,D>{self.mapv(A::sqrt)}// abs, pow, sin, cos, round, ceil, etc.
...
}
The following is a little part of my code, a lot of mappings were used here.
(solved by a local plug-in trait)
This is an improvement to reduce
Array::mapv
calling.The following is a little part of my code, a lot of mappings were used here.
(solved by a local plug-in trait)
I hope it can be officially supported.
The text was updated successfully, but these errors were encountered: