cfdm.DomainAncillary.set_interior_ring

DomainAncillary.set_interior_ring(interior_ring, copy=True)[source]

Set the interior_ring.

New in version (cfdm): 1.8.0

Parameters
interior_ring: InteriorRing

The interior_ring to be inserted.

copy: bool, optional

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

Returns

None

Examples:

>>> c = cfdm.DomainAncillary()
>>> i = cfdm.InteriorRing(data=cfdm.Data(numpy.arange(10).reshape(5, 2)))
>>> c.set_interior_ring(i)
>>> c.has_interior_ring()
True
>>> i = c.get_interior_ring()
>>> i
<InteriorRing: (5, 2) >
>>> i.data
<Data(5, 2): [[0, ..., 9]]>
>>> i.data.shape
(5, 2)
>>> c.del_interior_ring()
<InteriorRing (5, 2) >
>>> c.has_interior_ring()
False
>>> print(c.del_interior_ring(None))
None