summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Tille <tille@debian.org>2023-01-14 18:02:18 +0100
committerAndreas Tille <tille@debian.org>2023-01-14 18:02:18 +0100
commit5f31038b23defd2a58d0901fcab3a29f1e3f5d32 (patch)
tree4d27a44ce6590b34a5756cd4e665e048a75a3426
parente82b74431b59ca9200f038437ad2edd7fa0d9441 (diff)
Also replace np.bool
-rw-r--r--debian/changelog4
-rw-r--r--debian/patches/numpy_1.24.patch40
2 files changed, 42 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index ea8872b..81007e2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-pyranges (0.0.111+ds-4) UNRELEASED; urgency=medium
+pyranges (0.0.111+ds-4) unstable; urgency=medium
* Team upload.
* Adapt to numpy 1.24
@@ -6,7 +6,7 @@ pyranges (0.0.111+ds-4) UNRELEASED; urgency=medium
* Standards-Version: 4.6.2 (routine-update)
* No tab in license text (routine-update)
- -- Andreas Tille <tille@debian.org> Sat, 14 Jan 2023 16:30:10 +0100
+ -- Andreas Tille <tille@debian.org> Sat, 14 Jan 2023 16:32:08 +0100
pyranges (0.0.111+ds-3) unstable; urgency=medium
diff --git a/debian/patches/numpy_1.24.patch b/debian/patches/numpy_1.24.patch
index 2c058bd..6182909 100644
--- a/debian/patches/numpy_1.24.patch
+++ b/debian/patches/numpy_1.24.patch
@@ -14,3 +14,43 @@ Last-Update: Sat, 14 Jan 2023 16:30:10 +0100
sep="\t")
result = gr.coverage(gr2, strandedness=strandedness)
+--- a/pyranges/pyranges.py
++++ b/pyranges/pyranges.py
+@@ -1705,7 +1705,7 @@ class PyRanges():
+ For printing, the PyRanges was sorted on Chromosome and Strand.
+ """
+
+- subsetter = np.zeros(len(self), dtype=np.bool)
++ subsetter = np.zeros(len(self), dtype=bool)
+ subsetter[:n] = True
+ return self[subsetter]
+
+@@ -3571,7 +3571,7 @@ class PyRanges():
+ ValueError: Cannot take a larger sample than population when 'replace=False'
+ """
+ sample = np.random.choice(len(self), size=n, replace=False)
+- subsetter = np.zeros(len(self), dtype=np.bool)
++ subsetter = np.zeros(len(self), dtype=bool)
+ subsetter[sample] = True
+ return self[subsetter]
+
+@@ -4533,7 +4533,7 @@ class PyRanges():
+ For printing, the PyRanges was sorted on Chromosome and Strand.
+ """
+
+- subsetter = np.zeros(len(self), dtype=np.bool)
++ subsetter = np.zeros(len(self), dtype=bool)
+ subsetter[(len(self) - n):] = True
+ return self[subsetter]
+
+--- a/tests/hypothesis_helper.py
++++ b/tests/hypothesis_helper.py
+@@ -269,7 +269,7 @@ def genomicfeature(draw):
+ dataset = getattr(pr.data, dataset_name)()
+ dataset = dataset[dataset.Feature.isin(["gene", "transcript", "exon"])]
+
+- # subsetter = draw(arrays(np.bool, shape=len(dataset)))
++ # subsetter = draw(arrays(bool, shape=len(dataset)))
+ gene_ids = list(dataset.gene_id.drop_duplicates())
+ genes = draw(
+ st.lists(st.sampled_from(gene_ids), unique="True", min_size=1))