Roll arrays to match the different vertical axis. Parameters ---------- arr : ArrayLike Array to roll. reverse : bool, default: False Reverse the direction of the roll.
(
self, arr: "np.typing.ArrayLike", reverse: bool = False
)
| 1344 | self._focal_length = np.inf |
| 1345 | |
| 1346 | def _roll_to_vertical( |
| 1347 | self, arr: "np.typing.ArrayLike", reverse: bool = False |
| 1348 | ) -> np.ndarray: |
| 1349 | """ |
| 1350 | Roll arrays to match the different vertical axis. |
| 1351 | |
| 1352 | Parameters |
| 1353 | ---------- |
| 1354 | arr : ArrayLike |
| 1355 | Array to roll. |
| 1356 | reverse : bool, default: False |
| 1357 | Reverse the direction of the roll. |
| 1358 | """ |
| 1359 | if reverse: |
| 1360 | return np.roll(arr, (self._vertical_axis - 2) * -1) |
| 1361 | else: |
| 1362 | return np.roll(arr, (self._vertical_axis - 2)) |
| 1363 | |
| 1364 | def _get_scaled_limits(self): |
| 1365 | """ |
no outgoing calls
no test coverage detected