geometry.Geometry.split_prop#

Geometry.split_prop(prop=None, compact=True)#

Partition a Geometry according to the values in prop.

Parameters#

prop: int array_like, optional

A 1-dim int array with length self.n_elems() to be used in place of the objects own prop attribute. If None (default), the latter will be used.

Returns#

list of Geometry objects

A list of objects of the same class as the caller. Each object in the list contains all the elements having the same value of prop. The number of objects in the list is equal to the number of unique values in prop. The list is sorted in ascending order of the prop value.

If prop is None and the object has no prop attribute, an empty list is returned.