-
Notifications
You must be signed in to change notification settings - Fork 300
Closed
Description
The is_contiguous method assumes that the lower bound is in index 0, but when you reverse a coordinate, it is usually in index 1. Because of this:
>>> from iris.coords import DimCoord
>>> c = DimCoord(tuple(range(10)), 'latitude')
>>> c.is_contiguous()
False
>>> c.guess_bounds()
>>> c.is_contiguous()
True
>>> c[::-1].is_contiguous()
False
>>> c[::-1].bounds
array([[ 8.5, 9.5],
[ 7.5, 8.5],
[ 6.5, 7.5],
[ 5.5, 6.5],
[ 4.5, 5.5],
[ 3.5, 4.5],
[ 2.5, 3.5],
[ 1.5, 2.5],
[ 0.5, 1.5],
[-0.5, 0.5]])