Skip to content

Commit

Permalink
zach resquest fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Jul 11, 2024
1 parent c1cb3d2 commit f7018c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/spikeinterface/core/tests/test_unitsaggregationsorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ def test_unitsaggregationsorting(create_cache_folder):
spiketrain1_1 = sorting1.get_unit_spike_train(unit_ids[1], segment_index=seg)
spiketrains2_0 = sorting2.get_unit_spike_train(unit_ids[0], segment_index=seg)
spiketrains3_2 = sorting3.get_unit_spike_train(unit_ids[2], segment_index=seg)
assert np.allclose(spiketrain1_1, sorting_agg.get_unit_spike_train(str(unit_ids[1]), segment_index=seg))
assert np.allclose(spiketrain1_1, sorting_agg.get_unit_spike_train(unit_ids[1], segment_index=seg))
assert np.allclose(spiketrains2_0, sorting_agg.get_unit_spike_train(num_units + unit_ids[0], segment_index=seg))
assert np.allclose(
spiketrains2_0, sorting_agg.get_unit_spike_train(str(num_units + unit_ids[0]), segment_index=seg)
)
assert np.allclose(
spiketrains3_2, sorting_agg.get_unit_spike_train(str(2 * num_units + unit_ids[2]), segment_index=seg)
spiketrains3_2, sorting_agg.get_unit_spike_train(2 * num_units + unit_ids[2], segment_index=seg)
)

# test rename units
Expand Down
2 changes: 1 addition & 1 deletion src/spikeinterface/core/unitsaggregationsorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, sorting_list, renamed_unit_ids=None):
else:
default_unit_ids = [str(i) for i in range(num_all_units)]
if all_ids_are_same_type and np.issubdtype(unit_ids_dtypes[0], np.integer):
unit_ids = np.arange(num_all_units, dtype=dtype)
unit_ids = np.arange(num_all_units, dtype=np.uint64)
else:
unit_ids = default_unit_ids

Expand Down

0 comments on commit f7018c6

Please sign in to comment.