fameio 1.8__py3-none-any.whl → 1.8.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
fameio/source/cli.py CHANGED
@@ -237,7 +237,7 @@ def add_steps_after_argument(parser: argparse.ArgumentParser) -> None:
237
237
  def get_merging_args(args: argparse.Namespace) -> Dict[MergingOptions, int]:
238
238
  """Returns a dictionary of GroupingOptions with their values if `time_merging` entry exists"""
239
239
  merging_args = {}
240
- if "time_merging" in args:
240
+ if vars(args).get("time_merging"):
241
241
  merging_args[MergingOptions.FOCAL_POINT] = args.focal_point
242
242
  merging_args[MergingOptions.STEPS_BEFORE] = args.steps_before
243
243
  merging_args[MergingOptions.STEPS_AFTER] = args.steps_after
@@ -37,7 +37,7 @@ def apply_time_merging(data: Dict[Optional[str], pd.DataFrame], config: Optional
37
37
  index_columns = df.index.names
38
38
  df.reset_index(inplace=True)
39
39
  df["TimeStep"] = df["TimeStep"].apply(lambda t: merge_time(t, first_positive_focal_point, offset, period))
40
- data[key] = df.groupby(by=index_columns, axis=0).sum()
40
+ data[key] = df.groupby(by=index_columns).sum()
41
41
 
42
42
 
43
43
  def merge_time(time_step: int, focal_time: int, offset: int, period: int) -> int: