Skip to content

Commit

Permalink
changed numpy.float to float for compatibility with newer numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
hakyim committed Nov 28, 2023
1 parent aca7516 commit 4b3ad95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion software/Predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def run(args):
dosage = e[GF.FIRST_DOSAGE:]
if allele_align == -1:
dosage = tuple(map(lambda x: 2 - x, dosage))
dosage = numpy.array(dosage, dtype=numpy.float)
dosage = numpy.array(dosage, dtype=float)

snps_found.add(var_id)

Expand Down
4 changes: 2 additions & 2 deletions software/metax/genotype/BGENGenotype.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def bgen_file_geno_lines(file, variant_mapping = None, force_colon = False, use_

v = bgen["genotype"][variant.Index].compute()
if v["phased"]:
d = numpy.apply_along_axis(lambda x: x[1] + x[3], 1, numpy.array(v["probs"], dtype=numpy.float))
d = numpy.apply_along_axis(lambda x: x[1] + x[3], 1, numpy.array(v["probs"], dtype=float))
else:
d = numpy.apply_along_axis(lambda x: x[1] + x[2] * 2, 1, numpy.array(v["probs"], dtype=numpy.float))
d = numpy.apply_along_axis(lambda x: x[1] + x[2] * 2, 1, numpy.array(v["probs"], dtype=float))

#e = bgen_reader.allele_expectation(bgen, variant.Index)
#d2 = bgen_reader.compute_dosage(e, alt=1)
Expand Down

0 comments on commit 4b3ad95

Please sign in to comment.