From bf5cbac72a4ddc79f8d1d160333bc7ccee2054a6 Mon Sep 17 00:00:00 2001 From: Stephen Fleming Date: Mon, 28 Aug 2023 11:01:51 -0400 Subject: [PATCH] Make dtype of m explicit in apply_function_dense_chunks() np.uint64, this may be necessary on Windows --- cellbender/remove_background/estimation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cellbender/remove_background/estimation.py b/cellbender/remove_background/estimation.py index 2443724..c8bb235 100644 --- a/cellbender/remove_background/estimation.py +++ b/cellbender/remove_background/estimation.py @@ -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 @@ -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,