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
you can use Interp1D::new_unchecked(x.view(), y.view(), ...) if you know that the data is valid. This is basically free and you don't need to copy stuff.
fnmain(){let x = array![1.0,2.0,3.0,4.0];letmut y = array![5.0,4.0,4.5,6.0];let interp = Interp1D::builder(y.view()).x(x.view()).build();// this causes validation
y[0] = 6.0;// changing y does not invalidate the data so we can use new_uncheckedlet interp = Interp1D::new_unchecked(x.view(), y.view(),Linear::new().extrapolate(true));}
When working on an iterative methods when data needs to be modified and interpolated, there's 2 choices:
Both cases waste memoty and second also wastes CPU cycles.
It would be nice if we could have access to the original data, and mutable access would be amazing.
The text was updated successfully, but these errors were encountered: