Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Sep 23, 2023
1 parent f7ccfe9 commit afe87f6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions crates/polars-time/src/group_by/dynamic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -773,19 +773,19 @@ mod test {
"",
[0.0, 8.0, 4.000000000000002, 6.666666666666667, 24.5, 0.0],
);
// assert!((var - expected).abs().unwrap().lt(1e-12).unwrap().all());
//
// let var = unsafe { nulls.agg_var(&groups, 1) };
// let expected = Series::new("", [0.0, 8.0, 8.0, 9.333333333333343, 24.5, 0.0]);
// assert!((var - expected).abs().unwrap().lt(1e-12).unwrap().all());
//
// let quantile = unsafe { a.agg_quantile(&groups, 0.5, QuantileInterpolOptions::Linear) };
// let expected = Series::new("", [3.0, 5.0, 5.0, 6.0, 5.5, 1.0]);
// assert_eq!(quantile, expected);
//
// let quantile = unsafe { nulls.agg_quantile(&groups, 0.5, QuantileInterpolOptions::Linear) };
// let expected = Series::new("", [3.0, 5.0, 5.0, 7.0, 5.5, 1.0]);
// assert_eq!(quantile, expected);
assert!((var - expected).abs().unwrap().lt(1e-12).unwrap().all());

let var = unsafe { nulls.agg_var(&groups, 1) };
let expected = Series::new("", [0.0, 8.0, 8.0, 9.333333333333343, 24.5, 0.0]);
assert!((var - expected).abs().unwrap().lt(1e-12).unwrap().all());

let quantile = unsafe { a.agg_quantile(&groups, 0.5, QuantileInterpolOptions::Linear) };
let expected = Series::new("", [3.0, 5.0, 5.0, 6.0, 5.5, 1.0]);
assert_eq!(quantile, expected);

let quantile = unsafe { nulls.agg_quantile(&groups, 0.5, QuantileInterpolOptions::Linear) };
let expected = Series::new("", [3.0, 5.0, 5.0, 7.0, 5.5, 1.0]);
assert_eq!(quantile, expected);

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions crates/polars-time/src/windows/group_by.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,9 @@ pub(crate) fn group_by_values_iter_full_lookahead(

#[cfg(feature = "rolling_window")]
#[inline]
pub(crate) fn group_by_values_iter<'a>(
pub(crate) fn group_by_values_iter(
period: Duration,
time: &'a [i64],
time: &[i64],
closed_window: ClosedWindow,
tu: TimeUnit,
tz: Option<Tz>,
Expand Down

0 comments on commit afe87f6

Please sign in to comment.