diff --git a/cf/data/data.py b/cf/data/data.py index c9445a02d7..ed050cca01 100644 --- a/cf/data/data.py +++ b/cf/data/data.py @@ -5640,37 +5640,6 @@ def apply_masking( return d - @classmethod - def concatenate_data(cls, data_list, axis): - """Concatenates a list of Data objects into a single Data object - along the specified access (see cf.Data.concatenate for - details). In the case that the list contains only one element, - that element is simply returned. - - :Parameters: - - data_list: `list` - The list of data objects to concatenate. - - axis: `int` - The axis along which to perform the concatenation. - - :Returns: - - `Data` - The resulting single `Data` object. - - """ - if len(data_list) > 1: - data = cls.concatenate(data_list, axis=axis) - if data.fits_in_one_chunk_in_memory(data.dtype.itemsize): - data.varray - - return data - else: - assert len(data_list) == 1 - return data_list[0] - def argmax(self, axis=None, unravel=False): """Return the indices of the maximum values along an axis. diff --git a/cf/data/mixin/deprecations.py b/cf/data/mixin/deprecations.py index 4b3f078dee..a4f9cabda6 100644 --- a/cf/data/mixin/deprecations.py +++ b/cf/data/mixin/deprecations.py @@ -966,3 +966,32 @@ def reconstruct_sectioned_data(cls, sections, cyclic=(), hardmask=None): "Data method 'reconstruct_sectioned_data' has been deprecated " "at version TODODASK and is no longer available" ) + + @classmethod + def concatenate_data(cls, data_list, axis): + """Concatenates a list of Data objects along the specified axis. + + See cf.Data.concatenate for details. + + In the case that the list contains only one element, that element + is simply returned. + + :Parameters: + + data_list: `list` + The list of data objects to concatenate. + + axis: `int` + The axis along which to perform the concatenation. + + :Returns: + + `Data` + The resulting single `Data` object. + + """ + raise DeprecationError( + "Data method 'concatenate_data' has been deprecated at " + "version TODODASK and is no longer available. Use " + "'concatenate' instead." + )