Also ignore assertion errors in gallery plotting

This commit is contained in:
mbsantiago 2025-08-11 09:46:36 +01:00
parent 31a0d1bbb5
commit 65d13a32b7

View File

@ -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