Skip to content

Commit

Permalink
Fix plot_sorting_summary after #3412 with to_numpy() 3
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Sep 16, 2024
1 parent 81e53ab commit 2a1ecce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/spikeinterface/widgets/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ def plot_sortingview(self, data_plot, **backend_kwargs):
values = check_json(metrics.loc[unit_id].to_dict())
values_skip_nans = {}
for k, v in values.items():
# convert_dypes returns NaN as None or np.nan (for float)
if v is None:
continue
if np.isnan(v):
continue
values_skip_nans[k] = v
Expand Down
2 changes: 1 addition & 1 deletion src/spikeinterface/widgets/tests/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def setUpClass(cls):
spike_amplitudes=dict(),
unit_locations=dict(),
spike_locations=dict(),
quality_metrics=dict(metric_names=["snr", "isi_violation", "num_spikes"]),
quality_metrics=dict(metric_names=["snr", "isi_violation", "num_spikes", "amplitude_cutoff"]),
template_metrics=dict(),
correlograms=dict(),
template_similarity=dict(),
Expand Down

0 comments on commit 2a1ecce

Please sign in to comment.