diff --git a/package/CHANGELOG b/package/CHANGELOG index 96f8d04ff7f..758d4a2e78d 100644 --- a/package/CHANGELOG +++ b/package/CHANGELOG @@ -86,6 +86,8 @@ Enhancements * Improve the distance search in water bridge analysis with capped_distance (PR #2480) Changes + * Removed `format` keyword from :meth:`MemoryReader.timeseries` (Issue #1453, + #2443) * Deprecated :class:`LAMMPSDataConverter` has now been removed (Issue #2564) * Removed AtomGroup stubs (PR #1070, Issue #2443). * encore.hes() doesn't accept the details keyword anymore, it always returns diff --git a/package/MDAnalysis/coordinates/memory.py b/package/MDAnalysis/coordinates/memory.py index f4302ac2bea..23966ef1d19 100644 --- a/package/MDAnalysis/coordinates/memory.py +++ b/package/MDAnalysis/coordinates/memory.py @@ -246,10 +246,12 @@ class MemoryReader(base.ProtoReader): A trajectory reader interface to a numpy array of the coordinates. For compatibility with the timeseries interface, support is provided for - specifying the order of columns through the format option. + specifying the order of columns through the `order` keyword. .. versionadded:: 0.16.0 - + .. versionchanged:: 1.0.0 + Support for the deprecated `format` keyword for + :meth:`MemoryReader.timeseries` has now been removed. """ format = 'MEMORY' @@ -488,10 +490,10 @@ def _reopen(self): self.ts.frame = -1 self.ts.time = -1 - def timeseries(self, asel=None, start=0, stop=-1, step=1, order='afc', format=None): + def timeseries(self, asel=None, start=0, stop=-1, step=1, order='afc'): """Return a subset of coordinate data for an AtomGroup in desired - column order/format. If no selection is given, it will return a view of - the underlying array, while a copy is returned otherwise. + column order. If no selection is given, it will return a view of the + underlying array, while a copy is returned otherwise. Parameters --------- @@ -510,26 +512,11 @@ def timeseries(self, asel=None, start=0, stop=-1, step=1, order='afc', format=No of 'a', 'f', 'c' are allowed ie "fac" - return array where the shape is (frame, number of atoms, coordinates). - format : str (optional) - deprecated, equivalent to `order` - Note - ---- - The `format` parameter name is used to mimic the - :class:`MDAnalysis.coordinates.DCD.timeseries` interface. It is - identical to the `order` parameter for :class:`MemoryReader`. In a - future version, `format` will be renamed to `order`. - - .. deprecated:: 0.17.0 - `format` has been deprecated in favor of the standard keyword `order`. + .. versionchanged:: 1.0.0 + Deprecated `format` keyword has been removed. Use `order` instead. """ - if format is not None: - warnings.warn( - "'format' is deprecated and will be removed in 1.0. Use 'order' instead", - category=DeprecationWarning) - order = format - array = self.get_array() if order == self.stored_order: pass diff --git a/testsuite/MDAnalysisTests/coordinates/test_memory.py b/testsuite/MDAnalysisTests/coordinates/test_memory.py index 279125a90a4..2e71fe9c2c0 100644 --- a/testsuite/MDAnalysisTests/coordinates/test_memory.py +++ b/testsuite/MDAnalysisTests/coordinates/test_memory.py @@ -115,10 +115,6 @@ def test_iteration(self, ref, reader): def test_extract_array_afc(self,reader): assert_equal(reader.timeseries(order='afc').shape, (3341, 98, 3)) - def test_timeseries_deprecation(self, reader): - with pytest.warns(DeprecationWarning): - reader.timeseries(format='fac') - def test_extract_array_afc(self, reader): assert_equal(reader.timeseries(order='afc').shape, (3341, 98, 3))