Skip to content

Commit

Permalink
Raise error if calling deepsensor.plot.prediction with forecast
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-andersson committed Oct 20, 2024
1 parent 69a6097 commit fab1fd7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deepsensor/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,8 @@ def prediction(
ax = axes[row_i, col_i]

if pred.mode == "on-grid":
if "init_time" in pred[0].indexes:
raise ValueError("Plotting forecasts not currently supported.")
if param == "std":
vmin = 0
else:
Expand Down Expand Up @@ -1000,6 +1002,8 @@ def prediction(
# )

elif pred.mode == "off-grid":
if "init_time" in pred[0].index.names:
raise ValueError("Plotting forecasts not currently supported.")
import seaborn as sns

hue = (
Expand Down

0 comments on commit fab1fd7

Please sign in to comment.