cf.DimensionCoordinate.set_bounds

DimensionCoordinate.set_bounds(bounds, copy=True)[source]

Set the bounds.

New in version 3.0.0.

Parameters:
bounds: Bounds

The bounds to be inserted.

copy: bool, optional

If False then do not copy the bounds prior to insertion. By default the bounds are copied.

Returns:

None

Examples:

>>> import numpy
>>> b = cfdm.Bounds(data=cfdm.Data(numpy.arange(10).reshape(5, 2)))
>>> c.set_bounds(b)
>>> c.has_bounds()
True
>>> c.get_bounds()
<Bounds: (5, 2) >
>>> b = c.del_bounds()
>>> b
<Bounds: (5, 2) >
>>> c.has_bounds()
False
>>> print(c.get_bounds(None))
None
>>> print(c.del_bounds(None))
None