From: Ole Streicher <olebole@debian.org>
Date: Tue, 17 Jan 2023 08:58:53 +0100
Subject: Fix compability to numpy 1.24

---
 astrodendro/analysis.py           | 4 ++--
 astrodendro/dendrogram.py         | 8 ++++----
 astrodendro/pruning.py            | 2 +-
 astrodendro/tests/test_compute.py | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/astrodendro/analysis.py b/astrodendro/analysis.py
index 4df6e5a..657bfc5 100644
--- a/astrodendro/analysis.py
+++ b/astrodendro/analysis.py
@@ -77,7 +77,7 @@ class ScalarStatistic(object):
             Location of each element of values. The i-th array in the tuple
             describes the ith positional dimension
         """
-        self.values = values.astype(np.float)
+        self.values = values.astype(float)
         self.indices = indices
 
     @memoize
@@ -126,7 +126,7 @@ class ScalarStatistic(object):
             The variance (or co-variance matrix) of the data along the
             specified direction(s).
         """
-        w = np.atleast_2d(direction).astype(np.float)
+        w = np.atleast_2d(direction).astype(float)
         for row in w:
             row /= np.linalg.norm(row)
 
diff --git a/astrodendro/dendrogram.py b/astrodendro/dendrogram.py
index 8281c92..12f1455 100644
--- a/astrodendro/dendrogram.py
+++ b/astrodendro/dendrogram.py
@@ -27,7 +27,7 @@ def _sorted_by_idx(d):
 # utility dict to offsets of adjacent pixel list
 _offsets = dict((ndim, np.concatenate((
                 np.identity(ndim),
-                np.identity(ndim) * -1)).astype(np.int))
+                np.identity(ndim) * -1)).astype(int))
                 for ndim in range(1, 8))
 
 # the formula above generalizes this special case
@@ -655,11 +655,11 @@ class TreeIndex(object):
         #    index[offset[pi] : offset[pi] + npix[pi]]
         # and including subtrees is
         #    index[offset[pi] : offset[pi] + npix_subtree[pi]]
-        offset = np.zeros(idx_ct.size, dtype=np.int)
+        offset = np.zeros(idx_ct.size, dtype=int)
         npix = offset * 0
         npix_subtree = offset * 0
 
-        index = -np.ones(sz, dtype=np.int)
+        index = -np.ones(sz, dtype=int)
         order = dendrogram.all_structures
 
         pos = 0
@@ -852,4 +852,4 @@ def _make_trunk(dendrogram, keep_structures, is_independent):
     # To make the structure.level property fast, we ensure all the structures in the
     # trunk have their level cached as "0"
     for structure in dendrogram.trunk:
-        structure._level = 0  # See the definition of level() in structure.py
\ No newline at end of file
+        structure._level = 0  # See the definition of level() in structure.py
diff --git a/astrodendro/pruning.py b/astrodendro/pruning.py
index 1263e22..3dd9be4 100644
--- a/astrodendro/pruning.py
+++ b/astrodendro/pruning.py
@@ -40,7 +40,7 @@ def _ravel_multi_index(multi_index, dims, mode='raise'):
     else:  # mode == 'wrap'
         indices = [i % d for i, d in zip(indices, dims)]
 
-    result = np.zeros(len(multi_index[0]), dtype=np.int)
+    result = np.zeros(len(multi_index[0]), dtype=int)
     offset = 1
     for i, d in list(zip(indices, dims))[::-1]:
         result += (i * offset).ravel()
diff --git a/astrodendro/tests/test_compute.py b/astrodendro/tests/test_compute.py
index 464a9fb..29af6f5 100644
--- a/astrodendro/tests/test_compute.py
+++ b/astrodendro/tests/test_compute.py
@@ -110,7 +110,7 @@ class Test3DimensionalData(object):
         assert len(d.leaves) == 55
 
         # Now check every pixel in the data cube (this takes a while).
-        st_map = -np.ones(self.data.shape, dtype=np.int)
+        st_map = -np.ones(self.data.shape, dtype=int)
         for st in d.all_structures:
             st_map[st.indices(subtree=False)] = st.idx
 
