Expand the array of `subcls` to the size of `cls`.
(cls, subcls: Type['PoseArray'], array: np.ndarray)
| 151 | |
| 152 | @classmethod |
| 153 | def expand_array(cls, subcls: Type['PoseArray'], array: np.ndarray) -> np.ndarray: |
| 154 | """ |
| 155 | Expand the array of `subcls` to the size of `cls`. |
| 156 | """ |
| 157 | assert subcls.is_valid_array(array) |
| 158 | assert set(subcls.arrorder) <= set(cls.arrorder) |
| 159 | result = np.zeros(cls.kNumUsedMotors) |
| 160 | result[subcls.arrorder] = array |
| 161 | return result |
| 162 | |
| 163 | @classmethod |
| 164 | def contract_array(cls, subcls: Type['PoseArray'], array: np.ndarray) -> np.ndarray: |
no test coverage detected