unit_inplace
- m3sh.linalg.unit_inplace(u)[source]
In-place vector normalization.
Convenience function to normalize a vector. Modifies the input argument!
- Parameters:
u (ndarray, shape (3, )) – Vector in \(\mathbb{R}^3\).
- Returns:
The normalized input vector (not a normalized copy).
- Return type:
ndarray, shape (3, )
Note
No error checking (division by zero, input vector shape) is performed.