Skip to content

Commit

Permalink
Sync series and dataframe when subsampling
Browse files Browse the repository at this point in the history
Make sure that both the subsampling series and the dataframe are sliced
when calling statistical_inefficieny(). This ensure that the series and
the dataframe are in sync before the subsampled indices of the series
are applied to the dataframe.

Fixes alchemistry#198
  • Loading branch information
ptmerz committed Jun 22, 2022
1 parent 888602b commit a7f7994
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/alchemlyb/preprocessing/subsampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ def statistical_inefficiency(df, series=None, lower=None, upper=None, step=None,
raise ValueError("series and data must be sampled at the same times")

series = slicing(series, lower=lower, upper=upper, step=step)
df = slicing(df, lower=lower, upper=upper, step=step)

# calculate statistical inefficiency of series (could use fft=True but needs test)
statinef = statisticalInefficiency(series, fast=False)
Expand Down

0 comments on commit a7f7994

Please sign in to comment.