Skip to content

Commit

Permalink
Update src/spyglass/spikesorting/v1/curation.py
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Brozdowski <[email protected]>
  • Loading branch information
khl02007 and CBroz1 authored Dec 8, 2023
1 parent 7bfca04 commit 80ef44d
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/spyglass/spikesorting/v1/curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,15 +449,10 @@ def _list_to_merge_dict(


def _reverse_associations(assoc_dict):
result = []

for key, values in assoc_dict.items():
if values:
result.append([key] + values)
else:
result.append([key])

return result
return [
[key] + values if values else [key]
for key, values in assoc_dict.items()
]


def _merge_dict_to_list(merge_groups: dict) -> List:
Expand Down

0 comments on commit 80ef44d

Please sign in to comment.