Skip to content

Commit

Permalink
Make dtype of m explicit in apply_function_dense_chunks()
Browse files Browse the repository at this point in the history
np.uint64, this may be necessary on Windows
  • Loading branch information
sjfleming committed Aug 28, 2023
1 parent 0da3ed5 commit bf5cbac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cellbender/remove_background/estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ def apply_function_dense_chunks(noise_log_prob_coo: sp.coo_matrix,
"""
array_length = len(np.unique(noise_log_prob_coo.row))

m = np.zeros(array_length)
m = np.zeros(array_length, dtype=np.uint64)
out = np.zeros(array_length)
a = 0

Expand All @@ -829,7 +829,7 @@ def apply_function_dense_chunks(noise_log_prob_coo: sp.coo_matrix,
out[a:(a + len_s)] = s.detach().cpu().numpy()
a = a + len_s

return {'m': m.astype(int), 'result': out}
return {'m': m, 'result': out}


def pandas_grouped_apply(coo: sp.coo_matrix,
Expand Down

0 comments on commit bf5cbac

Please sign in to comment.