cf.Field.direction¶
-
Field.
direction
(*args, **kwargs)[source]¶ Whether or not a domain axis is increasing.
An domain axis is considered to be increasing if its dimension coordinate values are increasing in index space or if it has no dimension coordinate.
See also
- Parameters
- identity: optional
Select the domain axis construct by one of:
An identity or key of a 1-d dimension or auxiliary coordinate construct that whose data spans the domain axis construct.
A construct has a number of string-valued identities
defined by its
identities
method, and is selected if any of them match the identity parameter. identity may be a string that equals one of a construct’s identities; or are.Pattern
object that matches one of a construct’s identities viare.search
.Note that in the output of a
dump
method orprint
call, a metadata construct is always described by one of its identities, and so this description may always be used as an identity value.A domain axis construct identity
The domain axis is that which would be selected by passing the given axis description to a call of the construct’s
domain_axis
method. For example, for a value of'X'
, the domain axis construct returned byf.domain_axis('X')
is selected.None
. This is the default, which selects thedomain construct when there is only one of them.
- axes: deprecated at version 3.0.0
Use the identity parameter instead.
size: deprecated at version 3.0.0
kwargs: deprecated at version 3.0.0
- Returns
bool
Whether or not the domain axis is increasing.
Examples:
>>> print(f.dimension_coordinate('X').array) array([ 0 30 60]) >>> f.direction('X') True >>> g = f.flip('X') >>> g.direction('X') False