Skip to content

Commit

Permalink
Merge pull request #165 from light-curve/dependabot/cargo/itertools-t…
Browse files Browse the repository at this point in the history
…w-0.13
  • Loading branch information
hombit authored Jun 4, 2024
2 parents af9311d + b0d0877 commit ab213b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/features/bins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
});
Expand Down

0 comments on commit ab213b8

Please sign in to comment.