diff --git a/Cargo.toml b/Cargo.toml index df30365..2546ba8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ emcee_rand = { version = "^0.3.15", package = "rand" } enum_dispatch = "^0.3.9" fftw = { version = "^0.8", default-features = false } GSL = { version = "^6", default-features = false, optional = true } -itertools = "^0.12" +itertools = "^0.13" lazy_static = "^1.4" libm = "^0.2" macro_const = "^0.1" diff --git a/src/features/bins.rs b/src/features/bins.rs index 42c9e1d..a82a283 100644 --- a/src/features/bins.rs +++ b/src/features/bins.rs @@ -143,11 +143,11 @@ where .zip(ts.m.as_slice().iter().copied()) .zip(ts.w.as_slice().iter().copied()) .map(|((t, m), w)| (t, m, w)) - .group_by(|(t, _, _)| ((*t - self.offset) / self.window).floor()) + .chunk_by(|(t, _, _)| ((*t - self.offset) / self.window).floor()) .into_iter() - .map(|(x, group)| { + .map(|(x, chunk)| { let bin_t = (x + T::half()) * self.window; - let (n, bin_m, norm) = group + let (n, bin_m, norm) = chunk .fold((T::zero(), T::zero(), T::zero()), |acc, (_, m, w)| { (acc.0 + T::one(), acc.1 + m * w, acc.2 + w) });