Set a matrix-type parameter to mat_numpy. Args: mat_key (str): Key of the target matrix. in_mat or rotation_mat. mat_numpy (ndarray): Matrix in numpy format. Raises: TypeError: mat_numpy
(self, mat_key: str, mat_numpy: np.ndarray)
| 193 | raise ValueError(f'K mat cannot be converted to {k_dim}x{k_dim}') |
| 194 | |
| 195 | def set_mat_np(self, mat_key: str, mat_numpy: np.ndarray) -> None: |
| 196 | """Set a matrix-type parameter to mat_numpy. |
| 197 | |
| 198 | Args: |
| 199 | mat_key (str): |
| 200 | Key of the target matrix. in_mat or rotation_mat. |
| 201 | mat_numpy (ndarray): |
| 202 | Matrix in numpy format. |
| 203 | |
| 204 | Raises: |
| 205 | TypeError: |
| 206 | mat_numpy is not an np.ndarray. |
| 207 | """ |
| 208 | if not isinstance(mat_numpy, np.ndarray): |
| 209 | raise TypeError |
| 210 | self.set_mat_list(mat_key, mat_numpy.tolist()) |
| 211 | |
| 212 | def set_mat_list(self, mat_key: str, mat_list: List[list]) -> None: |
| 213 | """Set a matrix-type parameter to mat_list. |
no test coverage detected