diff --git a/.github/workflows/gh-ci-cron.yaml b/.github/workflows/gh-ci-cron.yaml index a2e21603e19..01fb8aa1bca 100644 --- a/.github/workflows/gh-ci-cron.yaml +++ b/.github/workflows/gh-ci-cron.yaml @@ -251,7 +251,6 @@ jobs: with: micromamba: true full-deps: true - gsd: "gsd<3.0" - name: install_mdanalysis run: | diff --git a/package/CHANGELOG b/package/CHANGELOG index 92a5baff309..cd6ee8c18fd 100644 --- a/package/CHANGELOG +++ b/package/CHANGELOG @@ -18,6 +18,8 @@ The rules for this file: * 2.7.0 Fixes + * Deprecated np.float_ and np.NaN aliases have been replaced with + their original type value (np.float64 and np.nan) (PR #4272) Enhancements diff --git a/package/MDAnalysis/lib/util.py b/package/MDAnalysis/lib/util.py index fbbb9679340..ec3473d0d59 100644 --- a/package/MDAnalysis/lib/util.py +++ b/package/MDAnalysis/lib/util.py @@ -1315,9 +1315,9 @@ def fixedwidth_bins(delta, xmin, xmax): """ if not np.all(xmin < xmax): raise ValueError('Boundaries are not sane: should be xmin < xmax.') - _delta = np.asarray(delta, dtype=np.float_) - _xmin = np.asarray(xmin, dtype=np.float_) - _xmax = np.asarray(xmax, dtype=np.float_) + _delta = np.asarray(delta, dtype=np.float64) + _xmin = np.asarray(xmin, dtype=np.float64) + _xmax = np.asarray(xmax, dtype=np.float64) _length = _xmax - _xmin N = np.ceil(_length / _delta).astype(np.int_) # number of bins dx = 0.5 * (N * _delta - _length) # add half of the excess to each end diff --git a/testsuite/MDAnalysisTests/analysis/test_density.py b/testsuite/MDAnalysisTests/analysis/test_density.py index 19189cbad92..80ff81bd5be 100644 --- a/testsuite/MDAnalysisTests/analysis/test_density.py +++ b/testsuite/MDAnalysisTests/analysis/test_density.py @@ -351,7 +351,7 @@ def test_ValueError_userdefn_xdim_nanvalue(self, universe): with pytest.raises(ValueError, match=regex): D = density.DensityAnalysis( universe.select_atoms(self.selections['static']), - delta=self.delta, xdim=np.NaN, ydim=10.0, zdim=10.0, + delta=self.delta, xdim=np.nan, ydim=10.0, zdim=10.0, gridcenter=self.gridcenters['static_defined']).run(step=5) def test_warn_noatomgroup(self, universe):