cf.DimensionCoordinate.varray

DimensionCoordinate.varray

Return a numpy view of the data.

Making changes to elements of the returned view changes the underlying data. Refer to numpy.ndarray.view.

Examples

>>> a = c.varray
>>> type(a)
<type 'numpy.ndarray'>
>>> a
array([0, 1, 2, 3, 4])
>>> a[0] = 999
>>> c.varray
array([999, 1, 2, 3, 4])

Previous topic

cf.DimensionCoordinate.Units

Next topic

cf.DimensionCoordinate.attributes

This Page