Skip to content

Commit

Permalink
np.arange: do not pass start as kwarg
Browse files Browse the repository at this point in the history
  • Loading branch information
deeenes committed Jun 17, 2024
1 parent 1a52b33 commit a1bf4a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion decoupler/method_aucell.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def nb_aucell(row, net, starts, offsets, n_up, n_fsets):
fset = net[srt:off]

# Compute max AUC for fset
x_th = np.arange(start=1, stop=fset.shape[0]+1, dtype=nb.i8)
x_th = np.arange(1, stop=fset.shape[0]+1, dtype=nb.i8)
x_th = x_th[x_th < n_up]
max_auc = np.sum(np.diff(np.append(x_th, n_up)) * x_th)

Expand Down
2 changes: 1 addition & 1 deletion decoupler/method_gsva.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def density(mat, kcdf=False):
@nb.njit(nb.types.Tuple((nb.f4[:, :], nb.i8[:, :]))(nb.f4[:, :]), parallel=True, cache=True)
def nb_get_D_I(mat):
n = mat.shape[1]
rev_idx = np.abs(np.arange(start=n, stop=0, step=-1, dtype=nb.f4) - n / 2)
rev_idx = np.abs(np.arange(n, stop=0, step=-1, dtype=nb.f4) - n / 2)
Idx = np.zeros(mat.shape, dtype=nb.i8)
for i in nb.prange(mat.shape[0]):
Idx[i] = np.argsort(-mat[i])
Expand Down

0 comments on commit a1bf4a7

Please sign in to comment.