bundles / scipy 1.18.0 / scipy / spatial / transform / _rigid_transform / RigidTransform / __setitem__
function
scipy.spatial.transform._rigid_transform:RigidTransform.__setitem__
Signature
def __setitem__(self, indexer: int | slice | EllipsisType | None | ArrayLike, value: RigidTransform)Summary
Set transform(s) at given index(es) in this object.
Parameters
indexer: int or slice or array_likeSpecifies which transform(s) to replace. A single indexer must be specified, i.e. as if indexing a 1 dimensional array or list.
value: `RigidTransform` instanceThe transform(s) to set.
Raises
: TypeErrorIf the transform is a single transform.
Examples
from scipy.spatial.transform import RigidTransform as Tf t = [[0, 0, 0], [1, 0, 0], [2, 0, 0]] # 3 translations tf = Tf.from_translation(t)✓
tf[0] = Tf.from_translation([9, 9, 9]) tf.translation✓
array([[9., 9., 9.],
[1., 0., 0.],
[2., 0., 0.]])
Aliases
scipy.spatial.transform.RigidTransform.__setitem__