From 1d423d7ef150f3e914abc837c53df93ef4f214b3 Mon Sep 17 00:00:00 2001 From: Felix Zimmermann Date: Sun, 30 May 2021 02:30:12 -0700 Subject: [PATCH] fix cpu time --- idi/simulation/time.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/idi/simulation/time.py b/idi/simulation/time.py index ac1b687..6cfc855 100644 --- a/idi/simulation/time.py +++ b/idi/simulation/time.py @@ -16,15 +16,15 @@ def _decaysum(a, t, tau): return x -@numba.njit(parallel=True) +@_numba.njit(parallel=True) def _psort(a, b): ''' idx = np.argsort(a, axis=-1) a = a[np.arange(a.shape[0])[:, None], idx] b = b[np.arange(a.shape[0])[:, None], idx] ''' - for i in numba.prange(len(a)): - ids = np.argsort(a[i]) + for i in _numba.prange(len(a)): + ids = _np.argsort(a[i]) a[i, :] = a[i][ids] b[i, :] = b[i][ids]