File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/doc/ndarray_for_numpy_users Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 98
98
//! .assign(&(fun(t + c * h, (&y + &dy).view())));
99
99
//! }
100
100
//!
101
- //! let y_new = &y + &(h * k.slice::<Ix2> (s![..-1, ..]).t().dot(&b));
101
+ //! let y_new = &y + &(h * k.slice(s![..-1, ..]).t().dot(&b));
102
102
//! let f_new = fun(t + h, y_new.view());
103
103
//!
104
104
//! k.slice_mut(s![-1, ..]).assign(&f_new);
162
162
//! }
163
163
//! // Similar case here — moving `&y` to the right hand side allows the addition
164
164
//! // to reuse the allocated array on the left hand side.
165
- //! let y_new = h * k.slice::<Ix2> (s![..-1, ..]).t().dot(&b) + &y;
165
+ //! let y_new = h * k.slice(s![..-1, ..]).t().dot(&b) + &y;
166
166
//! // Mutate the last row of `k` in-place instead of allocating a new array.
167
167
//! fun(t + h, y_new.view(), k.slice_mut(s![-1, ..]));
168
168
//!
You can’t perform that action at this time.
0 commit comments