Skip to content

Commit

Permalink
Numba code more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
DradeAW committed Nov 20, 2023
1 parent 3f71517 commit 8950077
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/spikeinterface/core/sorting_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ def vector_to_list_of_spiketrain_numba(sample_indices, unit_indices, num_units):

current_x = np.zeros(num_units, dtype=np.int64)
for s in range(num_spikes):
spike_trains[unit_indices[s]][current_x[unit_indices[s]]] = sample_indices[s]
current_x[unit_indices[s]] += 1
unit_index = unit_indices[s]
spike_trains[unit_index][current_x[unit_index]] = sample_indices[s]
current_x[unit_index] += 1

return spike_trains

Expand Down

0 comments on commit 8950077

Please sign in to comment.