Skip to content

Commit f917fe4

Browse files
committed
Merge branch 'dep_update' into develop
2 parents 3f9bcee + 9165478 commit f917fe4

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
### Changed
99
* Integrated Padding strategies into convolutions
10+
* Updated `ndarray-stats` to 0.2.0 adding `noisy_float` for median change
1011

1112
### Removed
1213

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ edition = "2018"
1212

1313
[dependencies]
1414
ndarray = "0.12"
15-
ndarray-stats = "0.1"
15+
ndarray-stats = "0.2"
16+
noisy_float = "0.1"
1617
num-traits = "0.2"
1718

1819
[dev-dependencies]

src/processing/filter.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use ndarray::prelude::*;
33
use ndarray::{IntoDimension, Zip};
44
use ndarray_stats::interpolate::*;
55
use ndarray_stats::Quantile1dExt;
6+
use noisy_float::types::n64;
67
use num_traits::{FromPrimitive, Num, ToPrimitive};
78
use std::marker::PhantomData;
89

@@ -31,7 +32,7 @@ where
3132
let mut result = Array3::<T>::zeros(self.dim());
3233
Zip::indexed(self.windows(region)).apply(|(i, j, k), window| {
3334
let mut flat_window = Array::from_iter(window.iter()).mapv(|x| *x);
34-
if let Some(v) = flat_window.quantile_mut::<Linear>(0.5) {
35+
if let Ok(v) = flat_window.quantile_mut(n64(0.5f64), &Linear{}) {
3536
result
3637
.get_mut([i + r_offset, j + c_offset, k])
3738
.map(|r| *r = v);

0 commit comments

Comments
 (0)