|
1 | 1 | from itertools import chain
|
2 |
| -from typing import BinaryIO, Dict, List, Tuple, Type |
| 2 | +from typing import BinaryIO, Dict, List, Tuple, Type, Union |
3 | 3 |
|
4 | 4 | import numpy as np
|
5 | 5 | import numpy.ma as ma
|
@@ -87,7 +87,7 @@ def focus(self):
|
87 | 87 | dimensions = (maxs - mins).tolist()
|
88 | 88 | self.header.dimensions = PoseHeaderDimensions(*dimensions)
|
89 | 89 |
|
90 |
| - def normalize(self, info: PoseNormalizationInfo|None=None, scale_factor: float = 1) -> "Pose": |
| 90 | + def normalize(self, info: Union[PoseNormalizationInfo,None]=None, scale_factor: float = 1) -> "Pose": |
91 | 91 | """
|
92 | 92 | Normalize the points to a fixed distance between two particular points.
|
93 | 93 |
|
@@ -203,7 +203,7 @@ def frame_dropout_normal(self, dropout_mean: float = 0.5, dropout_std: float = 0
|
203 | 203 | body, selected_indexes = self.body.frame_dropout_normal(dropout_mean=dropout_mean, dropout_std=dropout_std)
|
204 | 204 | return Pose(header=self.header, body=body), selected_indexes
|
205 | 205 |
|
206 |
| - def get_components(self, components: List[str], points: Dict[str, List[str]] = None): |
| 206 | + def get_components(self, components: List[str], points: Union[Dict[str, List[str]],None] = None): |
207 | 207 | """
|
208 | 208 | get pose components based on criteria.
|
209 | 209 |
|
|
0 commit comments