Skip to content

Commit

Permalink
remove np.int and np.float (#3295)
Browse files Browse the repository at this point in the history
Fixes #3113
- np.int and np.float is deprecated and will not work for numpy 1.20+
- Changed np.int in RDKit tests to np.int32 and np.int64
  • Loading branch information
lilyminium authored May 9, 2021
1 parent a9eafab commit d734a89
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions testsuite/MDAnalysisTests/coordinates/test_rdkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,11 @@ def test_standardize_patterns(self, smi, out):

@pytest.mark.parametrize("attr, value, getter", [
("index", 42, "GetIntProp"),
("index", np.int(42), "GetIntProp"),
("index", np.int32(42), "GetIntProp"),
("index", np.int64(42), "GetIntProp"),
("charge", 4.2, "GetDoubleProp"),
("charge", np.float(4.2), "GetDoubleProp"),
("charge", np.float32(4.2), "GetDoubleProp"),
("charge", np.float64(4.2), "GetDoubleProp"),
("type", "C.3", "GetProp"),
])
def test_set_atom_property(self, attr, value, getter):
Expand Down

0 comments on commit d734a89

Please sign in to comment.