Skip to content

Commit

Permalink
Merge pull request #2243 from alejoe91/fix-sv-labels
Browse files Browse the repository at this point in the history
Fix sortingview checks for NaN if strings
  • Loading branch information
samuelgarcia authored Nov 23, 2023
2 parents 0d5707f + a49394a commit aa67315
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/spikeinterface/widgets/utils_sortingview.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ def generate_unit_table_view(sorting, unit_properties=None, similarity_scores=No
for ui, unit in enumerate(sorting.unit_ids):
for prop_name in valid_unit_properties:
property_values = sorting.get_property(prop_name)
val0 = property_values[0]
if np.isnan(property_values[ui]):
continue
val0 = np.array(property_values[0])
if val0.dtype.kind == "f":
if np.isnan(property_values[ui]):
continue
values[prop_name] = property_values[ui]
ut_rows.append(vv.UnitsTableRow(unit_id=unit, values=check_json(values)))

Expand Down

0 comments on commit aa67315

Please sign in to comment.