Repository: biopython/biopython

Issue:
Numpy types deprecation causing CI runs to fail
This is a CI issue that appears to be affecting MacOS and Windows Python 3.8+ ([see forked CI run here](https://github.com/acvander/biopython/actions/runs/3728247282) and [project CI run here](https://github.com/biopython/biopython/actions/runs/3735206597)).
### Setup

I am reporting a problem with Biopython version, Python version, and operating
system as follows:

```python
import sys; print(sys.version)
import platform; print(platform.python_implementation()); print(platform.platform())
import Bio; print(Bio.__version__)
```

(*Please copy and run the above in your Python, and copy-and-paste the output*)

### Expected behaviour
CI run should complete without errors

### Actual behaviour
CI run has issues and tests fail due to numpy import error.

### Steps to reproduce
Currently occurs on CI runs in repository.

### Notes about error
It appears that this only occurs on numpy>=1.24. [Numpy started deprecation notices about this on v1.20](https://numpy.org/doc/stable/release/1.20.0-notes.html#using-the-aliases-of-builtin-types-like-np-int-is-deprecated), ~~but I am unable to find any official information about the removal occurring in v1.24~~ and [deprecations were expired for v1.24](https://github.com/numpy/numpy/pull/22607).

I'm working on getting a PR for this issue shortly.



Discussion:

Resolving patch:
diff --git a/Bio/PDB/SASA.py b/Bio/PDB/SASA.py
--- a/Bio/PDB/SASA.py
+++ b/Bio/PDB/SASA.py
@@ -203,7 +203,7 @@ def compute(self, entity, level="A"):
         twice_maxradii = np.max(radii) * 2
 
         # Calculate ASAs
-        asa_array = np.zeros((n_atoms, 1), dtype=np.int)
+        asa_array = np.zeros((n_atoms, 1), dtype=np.int64)
         ptset = set(range(self.n_points))
         for i in range(n_atoms):
 
diff --git a/Bio/PDB/internal_coords.py b/Bio/PDB/internal_coords.py
--- a/Bio/PDB/internal_coords.py
+++ b/Bio/PDB/internal_coords.py
@@ -749,7 +749,7 @@ def build_edraArrays(self) -> None:
         self.dCoordSpace: np.ndarray = np.empty(
             (2, self.dihedraLen, 4, 4), dtype=np.float64
         )
-        self.dcsValid: np.ndarray = np.zeros((self.dihedraLen), dtype=np.bool)
+        self.dcsValid: np.ndarray = np.zeros((self.dihedraLen), dtype=bool)
 
         # hedra atoms
         self.hAtoms: np.ndarray = np.zeros((self.hedraLen, 3, 4), dtype=np.float64)
@@ -786,10 +786,10 @@ def build_edraArrays(self) -> None:
         # dihedra forward/reverse data
         a2da_map = {}
         a2d_map = [[[], []] for _ in range(self.AAsiz)]
-        self.dRev: np.ndarray = np.zeros((self.dihedraLen), dtype=np.bool)
+        self.dRev: np.ndarray = np.zeros((self.dihedraLen), dtype=bool)
 
-        self.dH1ndx = np.empty(self.dihedraLen, dtype=np.int)
-        self.dH2ndx = np.empty(self.dihedraLen, dtype=np.int)
+        self.dH1ndx = np.empty(self.dihedraLen, dtype=np.int64)
+        self.dH2ndx = np.empty(self.dihedraLen, dtype=np.int64)
         self.h1d_map = [[] for _ in range(self.hedraLen)]
 
         self.id3_dh_index = {k[0:3]: [] for k in self.dihedraNdx.keys()}


Test patch:
diff --git a/Tests/test_Cluster.py b/Tests/test_Cluster.py
--- a/Tests/test_Cluster.py
+++ b/Tests/test_Cluster.py
@@ -251,7 +251,7 @@ def test_mask_parse(self):
                 [4.1, 2.2, 0.6, 5.5, 0.6],
                 [2.7, 2.5, 0.4, 5.7, 0.2],
             ],
-            numpy.float,
+            float,
         )
         try:
             treecluster(data, mask1)