upgrade ndarray

This commit is contained in:
Magnus Ulimoen 2020-04-22 17:59:13 +02:00
parent 1718053508
commit 6fe4e1460f
3 changed files with 5 additions and 18 deletions

View File

@ -5,7 +5,7 @@ authors = ["Magnus Ulimoen <flymagnus@gmail.com>"]
edition = "2018"
[dependencies]
ndarray = { version = "0.13.0", features = ["approx"] }
ndarray = { version = "0.13.1", features = ["approx"] }
approx = "0.3.2"
packed_simd = "0.3.3"
rayon = { version = "1.3.0", optional = true }

View File

@ -261,15 +261,8 @@ impl Field {
ArrayViewMut2<Float>,
ArrayViewMut2<Float>,
) {
let mut iter = self.0.outer_iter_mut();
let rho = iter.next().unwrap();
let rhou = iter.next().unwrap();
let rhov = iter.next().unwrap();
let e = iter.next().unwrap();
assert_eq!(iter.next(), None);
(rho, rhou, rhov, e)
self.0
.multi_slice_mut((s![0, .., ..], s![1, .., ..], s![2, .., ..], s![3, .., ..]))
}
pub fn north(&self) -> ArrayView2<Float> {

View File

@ -73,14 +73,8 @@ impl Field {
ArrayViewMut2<Float>,
ArrayViewMut2<Float>,
) {
let mut iter = self.0.outer_iter_mut();
let ex = iter.next().unwrap();
let hz = iter.next().unwrap();
let ey = iter.next().unwrap();
assert_eq!(iter.next(), None);
(ex, hz, ey)
self.0
.multi_slice_mut((s![0, .., ..], s![1, .., ..], s![2, .., ..]))
}
}