(vector: Tensor)
| 233 | |
| 234 | |
| 235 | def orthogonal_vector(vector: Tensor): |
| 236 | if vector.vector.size == 3: |
| 237 | x_not_parallel = (vector.vector[0] != 0) |
| 238 | ref = where(x_not_parallel, (0, 0, 1), (1, 0, 0)) |
| 239 | return vec_normalize(cross(vector, ref)) |
| 240 | raise NotImplementedError |
| 241 | |
| 242 | |
| 243 | def rotation_matrix(x: Union[float, math.Tensor, None], matrix_dim=channel('vector'), none_to_unit=False) -> Optional[Tensor]: |
no test coverage detected