Skip to content

Commit

Permalink
remove double copy in plotting func
Browse files Browse the repository at this point in the history
  • Loading branch information
ourownstory committed Sep 13, 2024
1 parent 9d1e8e8 commit 6efcc03
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions neuralprophet/forecaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -2332,7 +2332,7 @@ def plot(
plotted."
)
else:
fcst = fcst[fcst["ID"] == df_name].copy(deep=True)
fcst = fcst[fcst["ID"] == df_name]
log.info(f"Plotting data from ID {df_name}")
if forecast_in_focus is None:
forecast_in_focus = self.highlight_forecast_step_n
Expand Down Expand Up @@ -2448,7 +2448,7 @@ def get_latest_forecast(
"forecasted. "
)
else:
fcst = fcst[fcst["ID"] == df_name].copy(deep=True)
fcst = fcst[fcst["ID"] == df_name]
log.info(f"Getting data from ID {df_name}")
if include_history_data is None:
fcst = fcst[-(include_previous_forecasts + self.config_model.n_forecasts + self.config_model.max_lags) :]
Expand Down Expand Up @@ -2525,7 +2525,7 @@ def plot_latest_forecast(
"Please, especify ID to be plotted."
)
else:
fcst = fcst[fcst["ID"] == df_name].copy(deep=True)
fcst = fcst[fcst["ID"] == df_name]
log.info(f"Plotting data from ID {df_name}")
if len(self.config_model.quantiles) > 1:
log.warning(
Expand Down Expand Up @@ -2662,7 +2662,7 @@ def plot_components(
"Please, especify ID to be plotted."
)
else:
fcst = fcst[fcst["ID"] == df_name].copy(deep=True)
fcst = fcst[fcst["ID"] == df_name]
log.info(f"Plotting data from ID {df_name}")
else:
if df_name is None:
Expand Down

0 comments on commit 6efcc03

Please sign in to comment.