Skip to content

Commit b8a4e4a

Browse files
committed
np NANs -> np.nan, np minimal version 2.0
1 parent bf29fae commit b8a4e4a

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

deeptools/computeMatrixOperations.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def cbindMatrices(hm, args):
546546
# Add on additional NA initialized columns
547547
ncol = hm.matrix.matrix.shape[1]
548548
hm.matrix.matrix = np.hstack((hm.matrix.matrix, np.empty(hm2.matrix.matrix.shape)))
549-
hm.matrix.matrix[:, ncol:] = np.NAN
549+
hm.matrix.matrix[:, ncol:] = np.nan
550550

551551
# Update the values
552552
for idx2, group in enumerate(hm2.parameters["group_labels"]):

deeptools/heatmapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def compute_sub_matrix_worker(self, chrom, start, end, score_file_list, paramete
376376

377377
# create an empty matrix to store the values
378378
sub_matrix = np.zeros((len(regions), matrix_cols))
379-
sub_matrix[:] = np.NAN
379+
sub_matrix[:] = np.nan
380380

381381
j = 0
382382
sub_regions = []

deeptools/plotFingerprint.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ def getCHANCE(args, idx, mat):
203203
"""
204204
# Get the index of the reference sample
205205
if args.JSDsample not in args.bamfiles:
206-
return [np.NAN, np.NAN, np.NAN]
206+
return [np.nan, np.nan, np.nan]
207207
refIdx = args.bamfiles.index(args.JSDsample)
208208
if refIdx == idx:
209-
return [np.NAN, np.NAN, np.NAN]
209+
return [np.nan, np.nan, np.nan]
210210

211211
subMatrix = np.copy(mat[:, [idx, refIdx]])
212212
subMatrix[np.isnan(subMatrix)] = 0
@@ -272,10 +272,10 @@ def getJSD(args, idx, mat):
272272

273273
# Get the index of the reference sample
274274
if args.JSDsample not in args.bamfiles:
275-
return np.NAN
275+
return np.nan
276276
refIdx = args.bamfiles.index(args.JSDsample)
277277
if refIdx == idx:
278-
return np.NAN
278+
return np.nan
279279

280280
# These will hold the coverage histograms
281281
chip = np.zeros(MAXLEN, dtype=int)
@@ -339,7 +339,7 @@ def signalAndBinDist(x):
339339

340340
if abs(sum(PMFinput) - 1) > 0.01 or abs(sum(PMFchip) - 1) > 0.01:
341341
sys.stderr.write("Warning: At least one PMF integral is significantly different from 1! The JSD will not be returned")
342-
return np.NAN
342+
return np.nan
343343

344344
# Compute the JSD from the PMFs
345345
M = (PMFinput + PMFchip) / 2.0

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ authors = [
2121
]
2222
requires-python = ">=3.8"
2323
dependencies = [
24-
"numpy >= 1.9.0",
24+
"numpy >= 2.0.0",
2525
"scipy >= 0.17.0",
2626
"matplotlib >= 3.5.0",
2727
"pysam >= 0.14.0",

0 commit comments

Comments
 (0)