diff --git a/tangermeme/match.py b/tangermeme/match.py index 09288b8..cb117cb 100644 --- a/tangermeme/match.py +++ b/tangermeme/match.py @@ -372,7 +372,7 @@ def extract_matching_loci(loci, fasta, in_window=2114, out_window=1000, verbose=verbose) # Extract reference GC bins - matched_gc = X_matched.mean(axis=-1)[:, [1, 2]].sum(axis=1).numpy() + matched_gc = X_matched.mean(axis=-1, dtype=torch.float)[:, [1, 2]].sum(axis=1).numpy() matched_gc = ((matched_gc + gc_bin_width / 2.) // gc_bin_width).astype(int) @@ -387,4 +387,4 @@ def extract_matching_loci(loci, fasta, in_window=2114, out_window=1000, axis=(1, 2)).max())) matched_loci = matched_loci.sort_values(["chrom", "start"]) - return matched_loci \ No newline at end of file + return matched_loci