cf.Data.reconstruct_sectioned_data¶
-
classmethod
Data.
reconstruct_sectioned_data
(sections)[source]¶ Expects a dictionary of Data objects with ordering information as keys, as output by the section method when called with a Data object. Returns a reconstructed cf.Data object with the sections in the original order.
- Parameters
- Returns
Data
The resulting reconstructed Data object.
Examples:
>>> d = cf.Data(numpy.arange(120).reshape(2, 3, 4, 5)) >>> x = d.section([1, 3]) >>> len(x) 8 >>> e = cf.Data.reconstruct_sectioned_data(x) >>> e.equals(d) True