diff --git a/cf/field.py b/cf/field.py index 165d85d427..90b32d49d5 100644 --- a/cf/field.py +++ b/cf/field.py @@ -442,7 +442,9 @@ def __getitem__(self, indices): domain_axes[axis].set_size(size) # Record which axes were cyclic before the subspace - org_cyclic = [data_axes.index(axis) for axis in new.cyclic()] + org_cyclic = [ + data_axes.index(axis) for axis in new.cyclic() if axis in data_axes + ] # Set the subspaced data new.set_data(new_data, axes=data_axes, copy=False)