Skip to content

Commit

Permalink
Prevent KeyError for AD if only zero/one feature bands exist (#376)
Browse files Browse the repository at this point in the history
* Uninstall onnx to see if this is neceaasy

* Fix test

* Prevent KeyError if only one/zero band exist

* Clean
  • Loading branch information
JulienPeloton authored Feb 12, 2024
1 parent 55a64a7 commit cfba728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fink_science/anomaly_detection/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def get_key(x, band):
)
)
):
return pd.Series({}, dtype=np.float64)
return pd.Series({k: np.nan for k in MODEL_COLUMNS}, dtype=np.float64)
else:
return pd.Series(x[band])

Expand Down

0 comments on commit cfba728

Please sign in to comment.