itasca.data.scalararray

Functions and classes for working with UD scalar array.

Functions

itasca.data.scalararray.extra(slot: int) array float{scalar} or float{scalar}.

Get the scalar extra data in the given slot as an array. Extra variables accessed by array must be of type float or vec.

itasca.data.scalararray.ids() array int{scalar}.

Get the scalar ids as an array.

itasca.data.scalararray.in_group(group_name: str, slot=1) array bool{scalar}.

Return scalar group membership as a Boolean array.

itasca.data.scalararray.pos() array vec{scalar}.

Get a NumPy array of the current position of ud scalars.

itasca.data.scalararray.set_extra(slot: int, data: array float{scalar} or float{scalar}) None.

Set the scalar extra data in the given slot with an array. Extra variables set by array must be of type float or vec.

itasca.data.scalararray.set_group(membership: array bool{scalar}, group_name: str, slot=1) None.

Set scalar group from an array. Where membership True set the corresponding scalar to be a member of group group_name in the given slot.

itasca.data.scalararray.set_pos(array vec{scalar})

Set the position of ud scalar array.

itasca.data.scalararray.set_value(array float{scalar}) None.

Set the values of ud scalars.

itasca.data.scalararray.value() array float{scalar}.

Get a NumPy array of the current value of ud scalars.