Skip to content

Commit fab1fd7

Browse files
committed
Raise error if calling deepsensor.plot.prediction with forecast
1 parent 69a6097 commit fab1fd7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

deepsensor/plot.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,8 @@ def prediction(
954954
ax = axes[row_i, col_i]
955955

956956
if pred.mode == "on-grid":
957+
if "init_time" in pred[0].indexes:
958+
raise ValueError("Plotting forecasts not currently supported.")
957959
if param == "std":
958960
vmin = 0
959961
else:
@@ -1000,6 +1002,8 @@ def prediction(
10001002
# )
10011003

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

10051009
hue = (

0 commit comments

Comments
 (0)