geometry.Geometry.to_prop#

Geometry.to_prop(prop)#

Create a valid set of properties for the object.

Parameters#

prop: int or int array_like

The property values to turn into a valid set for the object. If a single int, all elements get the same property value. If the number of passed values is less than the number of elements, the list will be repeated. If more values are passed than the number of elements, the excess ones are ignored.

Returns#

int array

A 1-dim int array that is valid as a property array for the Geometry object. The length of the array is self.n_elems() and the dtype is Int.

See Also#

Note#

When you set the properties (using set_prop()) you do not need to call this method to validate the properties. It is implicitely called from set_prop().