useless conversion
This commit is contained in:
parent
b5360af6de
commit
8873f458b4
|
@ -256,7 +256,7 @@ pub fn default_context() -> HashMapContext {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
let b = arg[0].as_boolean()?;
|
let b = arg[0].as_boolean()?;
|
||||||
if b.into() {
|
if b {
|
||||||
Ok(arg[1].clone())
|
Ok(arg[1].clone())
|
||||||
} else {
|
} else {
|
||||||
Ok(arg[2].clone())
|
Ok(arg[2].clone())
|
||||||
|
|
|
@ -224,7 +224,7 @@ pub(crate) fn diff_op_2d_fallback<const M: usize, const N: usize, const D: usize
|
||||||
};
|
};
|
||||||
let idx = 1.0 / dx;
|
let idx = 1.0 / dx;
|
||||||
|
|
||||||
fut.fill(0.0.into());
|
fut.fill(0.0);
|
||||||
let (mut fut0, mut futmid, mut futn) = fut.multi_slice_mut((
|
let (mut fut0, mut futmid, mut futn) = fut.multi_slice_mut((
|
||||||
ndarray::s![.., ..M],
|
ndarray::s![.., ..M],
|
||||||
ndarray::s![.., M..nx - M],
|
ndarray::s![.., M..nx - M],
|
||||||
|
@ -301,7 +301,7 @@ pub(crate) fn diff_op_2d_sliceable_y<const M: usize, const N: usize, const D: us
|
||||||
};
|
};
|
||||||
let idx = 1.0 / dx;
|
let idx = 1.0 / dx;
|
||||||
|
|
||||||
fut.fill(0.0.into());
|
fut.fill(0.0);
|
||||||
let (mut fut0, mut futmid, mut futn) = fut.multi_slice_mut((
|
let (mut fut0, mut futmid, mut futn) = fut.multi_slice_mut((
|
||||||
ndarray::s![.., ..M],
|
ndarray::s![.., ..M],
|
||||||
ndarray::s![.., M..nx - M],
|
ndarray::s![.., M..nx - M],
|
||||||
|
|
Loading…
Reference in New Issue