mirror of
https://github.com/macaodha/batdetect2.git
synced 2026-01-10 17:19:34 +01:00
Also ignore assertion errors in gallery plotting
This commit is contained in:
parent
31a0d1bbb5
commit
65d13a32b7
@ -100,7 +100,7 @@ def plot_class_examples(
|
||||
preprocessor=preprocessor,
|
||||
duration=duration,
|
||||
)
|
||||
except ValueError:
|
||||
except (ValueError, AssertionError):
|
||||
continue
|
||||
|
||||
for index, match in enumerate(false_positives[:n_examples]):
|
||||
@ -112,7 +112,7 @@ def plot_class_examples(
|
||||
preprocessor=preprocessor,
|
||||
duration=duration,
|
||||
)
|
||||
except ValueError:
|
||||
except (ValueError, AssertionError):
|
||||
continue
|
||||
|
||||
for index, match in enumerate(false_negatives[:n_examples]):
|
||||
@ -124,7 +124,7 @@ def plot_class_examples(
|
||||
preprocessor=preprocessor,
|
||||
duration=duration,
|
||||
)
|
||||
except ValueError:
|
||||
except (ValueError, AssertionError):
|
||||
continue
|
||||
|
||||
for index, match in enumerate(cross_triggers[:n_examples]):
|
||||
@ -136,7 +136,7 @@ def plot_class_examples(
|
||||
preprocessor=preprocessor,
|
||||
duration=duration,
|
||||
)
|
||||
except ValueError:
|
||||
except (ValueError, AssertionError):
|
||||
continue
|
||||
|
||||
return fig
|
||||
|
||||
Loading…
Reference in New Issue
Block a user