Skip to content

Commit

Permalink
fix cpu time
Browse files Browse the repository at this point in the history
  • Loading branch information
fzimmermann89 committed May 30, 2021
1 parent 446ddb4 commit 1d423d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions idi/simulation/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 1d423d7

Please sign in to comment.