Skip to content

Commit

Permalink
remove numba type signature (#2932)
Browse files Browse the repository at this point in the history
Co-authored-by: Heberto Mayorquin <[email protected]>
  • Loading branch information
zm711 and h-mayorquin authored May 30, 2024
1 parent 9a12ac9 commit f925c44
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/spikeinterface/core/sorting_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def get_numba_vector_to_list_of_spiketrain():

import numba

@numba.jit((numba.int64[::1], numba.int64[::1], numba.int64), nopython=True, nogil=True, cache=False)
@numba.jit(nopython=True, nogil=True, cache=False)
def vector_to_list_of_spiketrain_numba(sample_indices, unit_indices, num_units):
"""
Fast implementation of vector_to_dict using numba loop.
Expand Down
5 changes: 2 additions & 3 deletions src/spikeinterface/postprocessing/correlograms.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def compute_correlograms_numba(sorting, window_size, bin_size):

if HAVE_NUMBA:

@numba.jit((numba.int64[::1], numba.int32, numba.int32), nopython=True, nogil=True, cache=False)
@numba.jit(nopython=True, nogil=True, cache=False)
def _compute_autocorr_numba(spike_times, window_size, bin_size):
num_half_bins = window_size // bin_size
num_bins = 2 * num_half_bins
Expand All @@ -341,7 +341,7 @@ def _compute_autocorr_numba(spike_times, window_size, bin_size):

return auto_corr

@numba.jit((numba.int64[::1], numba.int64[::1], numba.int32, numba.int32), nopython=True, nogil=True, cache=False)
@numba.jit(nopython=True, nogil=True, cache=False)
def _compute_crosscorr_numba(spike_times1, spike_times2, window_size, bin_size):
num_half_bins = window_size // bin_size
num_bins = 2 * num_half_bins
Expand All @@ -367,7 +367,6 @@ def _compute_crosscorr_numba(spike_times1, spike_times2, window_size, bin_size):
return cross_corr

@numba.jit(
(numba.int64[:, :, ::1], numba.int64[::1], numba.int32[::1], numba.int32, numba.int32),
nopython=True,
nogil=True,
cache=False,
Expand Down
1 change: 0 additions & 1 deletion src/spikeinterface/postprocessing/isi.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ def compute_isi_histograms_numba(sorting, window_ms: float = 50.0, bin_ms: float
if HAVE_NUMBA:

@numba.jit(
(numba.int64[:, ::1], numba.int64[::1], numba.int32[::1], numba.int64[::1]),
nopython=True,
nogil=True,
cache=False,
Expand Down
3 changes: 1 addition & 2 deletions src/spikeinterface/qualitymetrics/misc_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ def _compute_violations(obs_viol, firing_rate, spike_count, ref_period_dur, cont

if HAVE_NUMBA:

@numba.jit((numba.int64[::1], numba.int32), nopython=True, nogil=True, cache=False)
@numba.jit(nopython=True, nogil=True, cache=False)
def _compute_nb_violations_numba(spike_train, t_r):
n_v = 0
N = len(spike_train)
Expand All @@ -1383,7 +1383,6 @@ def _compute_nb_violations_numba(spike_train, t_r):
return n_v

@numba.jit(
(numba.int64[::1], numba.int64[::1], numba.int32[::1], numba.int32, numba.int32),
nopython=True,
nogil=True,
cache=False,
Expand Down

0 comments on commit f925c44

Please sign in to comment.