Skip to content

Commit

Permalink
made sure _shape is set in case of prexisting _shape of ()
Browse files Browse the repository at this point in the history
  • Loading branch information
ESadek-MO committed Dec 24, 2024
1 parent 8bddec7 commit 2a67050
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/iris/_data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ def data(self, data):
data = ma.array(data.data, mask=data.mask, dtype=data.dtype)
self._lazy_array = None
self._real_array = data
if not has_shape:
# sets ``self._shape`` if it is None, or if it is being converted from
# ( ) to (1, )
if not has_shape or (self._shape == () and data.shape == (1,)):
self._shape = self.core_data().shape

# Check the manager contract, as the managed data has changed.
Expand Down

0 comments on commit 2a67050

Please sign in to comment.