cf.BoundedVariable.flip¶
-
BoundedVariable.
flip
(axes=None, i=False)[source]¶ Flip dimensions of the data array and bounds in place.
The trailing dimension of the bounds is flipped if and only if the bounded variable is 1 or 0 dimensional.
New in version 2.0.
Parameters: - axes : (sequence of) int, optional
Flip the dimensions whose positions are given. By default all dimensions are flipped.
- i:
bool
, optional If True then update the bounded variable in place. By default a new bounded variable is created. In either case, a bounded variable is returned.
Returns: out : cf.BoundedVariable
Examples: >>> c.flip() >>> c.flip(1)
>>> d = c[::-1, :, ::-1, :] >>> c.flip([2, 0]).equals(d) True