itasca.data.tensorarray

Functions and classes for working with UD tensor array.

Functions

itasca.data.tensorarray.extra(slot: int) array float{tensor} or float{tensor}.

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

itasca.data.tensorarray.ids() array int{tensor}.

Get the tensor ids as an array.

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

Return tensor group membership as a Boolean array.

itasca.data.tensorarray.pos() array vec{tensor}.

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

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

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

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

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

itasca.data.tensorarray.set_pos(array vec{tensor})

Set the position of ud tensor array.

itasca.data.tensorarray.set_value(array stens{tensor}) None.

Set the values of ud tensors.

itasca.data.tensorarray.value() array stens{tensor}.

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