You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is confusing and potentially a bit awkward, as it looks like Iris can't make its mind up...
Of course this comes down to the presence of the __iter__ method, whose presence means the Cube class reports as being iterable, while the method itself just raises an error. We could:
remove the __iter__ method, which is simple to do but unfortunately reverses the problem (Cube reports as not being iterable, while you actually can then iterate over a cube on its leading dimension)
explicitly support iterating by extending __iter__, which is more complicated and potentially undefined
... do something more clever than either of these suggestions
just ignore it
The text was updated successfully, but these errors were encountered:
At the moment, cubes report as being iterables, but raise an error if you try to iterate over a cube:
This is confusing and potentially a bit awkward, as it looks like Iris can't make its mind up...
Of course this comes down to the presence of the
__iter__
method, whose presence means the Cube class reports as being iterable, while the method itself just raises an error. We could:__iter__
method, which is simple to do but unfortunately reverses the problem (Cube reports as not being iterable, while you actually can then iterate over a cube on its leading dimension)__iter__
, which is more complicated and potentially undefinedThe text was updated successfully, but these errors were encountered: