cf.DimensionCoordinate.direction

DimensionCoordinate.direction()[source]

Return True if the dimension coordinate is increasing, otherwise return False.

A dimension coordinate is increasing if its coordinate values are increasing in index space.

The direction is inferred from one of, in order of precedence:

  • The data array
  • The bounds data array
  • The units CF property
Returns :
out : bool

Whether or not the coordinate is increasing.

Examples

>>> c.array
array([  0  30  60])
>>> c.direction()
True
>>> c.bounds.array
array([  30  0])
>>> c.direction()
False

Previous topic

cf.DimensionCoordinate.delprop

Next topic

cf.DimensionCoordinate.dump

This Page