diff --git a/azure-pipelines.yml b/azure-pipelines.yml index adf0217c449..5233f7a96e4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,6 +25,7 @@ jobs: PYTHON_VERSION: '3.8' PYTHON_ARCH: 'x86' BUILD_TYPE: 'normal' + NUMPY_MIN: '1.20.0' imageName: 'windows-2019' Win-Python38-64bit-full: PYTHON_VERSION: '3.8' @@ -102,8 +103,8 @@ jobs: # to check the ABI compatibility of our wheels - script: >- python -m pip install numpy==$(NUMPY_MIN) - displayName: 'pin to older NumPy (wheel test)' - condition: and(succeeded(), eq(variables['BUILD_TYPE'], 'wheel')) + displayName: 'pin to older NumPy (wheel test and 32bit)' + condition: and(succeeded(), ne(variables['NUMPY_MIN'], '')) - script: >- python -m pip install biopython @@ -120,6 +121,9 @@ jobs: rdkit>=2020.03.1 displayName: 'Install additional dependencies for 64-bit tests' condition: and(succeeded(), eq(variables['PYTHON_ARCH'], 'x64')) + - script: >- + pip list + displayName: 'List of installed dependencies' - powershell: | cd package python setup.py install diff --git a/package/CHANGELOG b/package/CHANGELOG index 46873262163..9cc41c4cdae 100644 --- a/package/CHANGELOG +++ b/package/CHANGELOG @@ -26,6 +26,15 @@ Changes Deprecations +12/21/22 IAlibay + + * 2.4.2 + +Fixes + * np.histogramdd calls in :class:`DensityAnalysis` now pass the `density` + argument rather than the NumPy 1.24 removed `normed` (PR #3976) + + 12/17/22 IAlibay * 2.4.1 diff --git a/package/MDAnalysis/analysis/density.py b/package/MDAnalysis/analysis/density.py index f516917257a..d5c62866768 100644 --- a/package/MDAnalysis/analysis/density.py +++ b/package/MDAnalysis/analysis/density.py @@ -463,7 +463,7 @@ def _prepare(self): bins = BINS['Nbins'] # create empty grid with the right dimensions (and get the edges) grid, edges = np.histogramdd(np.zeros((1, 3)), bins=bins, - range=arange, normed=False) + range=arange, density=False) grid *= 0.0 self._grid = grid self._edges = edges @@ -473,7 +473,7 @@ def _prepare(self): def _single_frame(self): h, _ = np.histogramdd(self._atomgroup.positions, bins=self._bins, range=self._arange, - normed=False) + density=False) # reduce (proposed change #2542 to match the parallel version in pmda.density) # return self._reduce(self._grid, h) # @@ -644,7 +644,7 @@ class Density(Grid): If the input histogram consists of counts per cell then the :meth:`Density.make_density` method converts the grid to a physical density. For - a probability density, divide it by :meth:`Density.grid.sum` or use ``normed=True`` + a probability density, divide it by :meth:`Density.grid.sum` or use ``density=True`` right away in :func:`~numpy.histogramdd`. The user *should* set the *parameters* keyword (see docs for the