diff --git a/batdetect2/utils/detector_utils.py b/batdetect2/utils/detector_utils.py index d8942e0..8d6ca7f 100644 --- a/batdetect2/utils/detector_utils.py +++ b/batdetect2/utils/detector_utils.py @@ -242,7 +242,7 @@ def format_single_result( ) class_name = class_names[np.argmax(class_overall)] annotations = get_annotations_from_preds(predictions, class_names) - except (np.exceptions.AxisError, ValueError): + except (np.AxisError, ValueError): # No detections class_overall = np.zeros(len(class_names)) class_name = "None"