diff --git a/lib/iris/_data_manager.py b/lib/iris/_data_manager.py index 1e7a5171b3..87caf0738d 100644 --- a/lib/iris/_data_manager.py +++ b/lib/iris/_data_manager.py @@ -5,14 +5,14 @@ """Management of common state and behaviour for cube and coordinate data.""" import copy - -import iris.exceptions -import iris.warnings from warnings import warn + import numpy as np import numpy.ma as ma from iris._lazy_data import as_concrete_data, as_lazy_data, is_lazy_data +import iris.exceptions +import iris.warnings class DataManager: @@ -47,8 +47,6 @@ def __init__(self, data, shape=None): msg = f"A cube may not be created without both data and a custom shape." warn(msg, iris.warnings.IrisUserWarning) - - def __copy__(self): """Forbid :class:`~iris._data_manager.DataManager` instance shallow-copy support.""" name = type(self).__name__ @@ -290,7 +288,6 @@ def ndim(self): def shape(self): """The shape of the data being managed.""" if self.data is None: - # if self._lazy_array is None and np.all(self.data == None): result = self._shape else: result = self.core_data().shape diff --git a/lib/iris/cube.py b/lib/iris/cube.py index abeceff819..66f694da8d 100644 --- a/lib/iris/cube.py +++ b/lib/iris/cube.py @@ -1190,7 +1190,7 @@ def _walk_nodes(node): def __init__( self, - data: np.typing.ArrayLike, # should this now be none? test this + data: np.typing.ArrayLike, # should this now be none? test this shape: tuple | None = None, standard_name: str | None = None, long_name: str | None = None,