- qspec. transform ( t , vec , axis=-1 )[source]
-
Transform vectors with a matrix, $\vec{v}^\prime = T\vec{v}$.
- Parameters:
-
- tarray_like
The transformation matrix $T$. It must hold
t.shape[axis + 1] == vec.shape[axis].- vecarray_like
The vector $\vec{v}$ to be transformed.
- axisint
The axis along which the vector components of
vecare aligned and that is summed over.
- Returns:
-
- vec_newndarray
The transformed vector $\vec{v}^\prime$.
- Raises:
-
- ValueError
If the shapes of
tandvecare not compatible.