sponge.function.calc_angle_by_vectors
- sponge.function.calc_angle_by_vectors(vector1: Tensor, vector2: Tensor, keepdims: bool = False)[source]
Compute angle between two vectors. For vector
and , the formula is- Parameters
vector1 (Tensor) – Tensor of shape
. Data type is float. D means spatial dimension of the simulation system. Usually is 3. Vector of .vector2 (Tensor) – Tensor of shape
. Data type is float. Vector of .keepdims (bool) – If this is set to True, the last axis will be left in the result as dimensions with size one. Default:
False
.
- Returns
angle (Tensor), a tensor of shape
or . Data type is float.
- Supported Platforms:
Ascend
GPU