Skip to content

Commit 99eaaf9

Browse files
committed
Run cargo fmt
1 parent e6df0ae commit 99eaaf9

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

src/correlation.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ mod cov_tests {
178178
let a = Array::from_elem((n_random_variables, n_observations), value);
179179
a.cov(1.).all_close(
180180
&Array::zeros((n_random_variables, n_random_variables)),
181-
1e-8
181+
1e-8,
182182
)
183183
}
184184

@@ -188,7 +188,7 @@ mod cov_tests {
188188
let n_observations = 4;
189189
let a = Array::random(
190190
(n_random_variables, n_observations),
191-
Uniform::new(-bound.abs(), bound.abs())
191+
Uniform::new(-bound.abs(), bound.abs()),
192192
);
193193
let covariance = a.cov(1.);
194194
covariance.all_close(&covariance.t(), 1e-8)
@@ -278,7 +278,7 @@ mod pearson_correlation_tests {
278278
let n_observations = 4;
279279
let a = Array::random(
280280
(n_random_variables, n_observations),
281-
Uniform::new(-bound.abs(), bound.abs())
281+
Uniform::new(-bound.abs(), bound.abs()),
282282
);
283283
let pearson_correlation = a.pearson_correlation();
284284
pearson_correlation.all_close(&pearson_correlation.t(), 1e-8)
@@ -290,7 +290,10 @@ mod pearson_correlation_tests {
290290
let n_observations = 4;
291291
let a = Array::from_elem((n_random_variables, n_observations), value);
292292
let pearson_correlation = a.pearson_correlation();
293-
pearson_correlation.iter().map(|x| x.is_nan()).fold(true, |acc, flag| acc & flag)
293+
pearson_correlation
294+
.iter()
295+
.map(|x| x.is_nan())
296+
.fold(true, |acc, flag| acc & flag)
294297
}
295298

296299
#[test]

src/entropy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ where
217217
#[cfg(test)]
218218
mod tests {
219219
use super::EntropyExt;
220-
use approx::assert_abs_diff_eq;
221220
use crate::errors::{EmptyInput, MultiInputError};
221+
use approx::assert_abs_diff_eq;
222222
use ndarray::{array, Array1};
223223
use noisy_float::types::n64;
224224
use std::f64;

src/histogram/bins.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ mod edges_tests {
340340
let edges = Edges::from(v);
341341
let n = edges.len();
342342
for i in 1..n {
343-
if edges[i-1] > edges[i] {
343+
if edges[i - 1] > edges[i] {
344344
return false;
345345
}
346346
}
@@ -353,7 +353,7 @@ mod edges_tests {
353353
let edges = Edges::from(a);
354354
let n = edges.len();
355355
for i in 1..n {
356-
if edges[i-1] > edges[i] {
356+
if edges[i - 1] > edges[i] {
357357
return false;
358358
}
359359
}
@@ -367,7 +367,7 @@ mod edges_tests {
367367
if view.len() == 0 {
368368
true
369369
} else {
370-
let last = view[view.len()-1];
370+
let last = view[view.len() - 1];
371371
edges.indices_of(&last).is_none()
372372
}
373373
}

src/quantile/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use self::interpolate::{higher_index, lower_index, Interpolate};
22
use super::sort::get_many_from_sorted_mut_unchecked;
3-
use crate::errors::{EmptyInput, MinMaxError, MinMaxError::UndefinedOrder};
43
use crate::errors::QuantileError;
4+
use crate::errors::{EmptyInput, MinMaxError, MinMaxError::UndefinedOrder};
5+
use crate::{MaybeNan, MaybeNanExt};
56
use ndarray::prelude::*;
67
use ndarray::{Data, DataMut, RemoveAxis, Zip};
78
use noisy_float::types::N64;
89
use std::cmp;
9-
use crate::{MaybeNan, MaybeNanExt};
1010

1111
/// Quantile methods for `ArrayBase`.
1212
pub trait QuantileExt<A, S, D>

0 commit comments

Comments
 (0)