|
10 | 10 | import numpy as np |
11 | 11 |
|
12 | 12 | from typing import Union, Callable, List, Dict |
13 | | -from numpy.typing import NDArray |
14 | | -# from types import EllipsisType # requires python 3.10+ |
15 | | -import builtins # use 'builtins.ellipsis' instead |
16 | 13 |
|
17 | 14 | from velociraptor.units import VelociraptorUnits |
18 | 15 | from velociraptor.catalogue.derived import DerivedQuantities |
@@ -171,7 +168,7 @@ def generate_sub_catalogue( |
171 | 168 | registration_function: Callable, |
172 | 169 | units: VelociraptorUnits, |
173 | 170 | field_metadata: List[VelociraptorFieldMetadata], |
174 | | - mask: Union['builtins.ellipsis', NDArray[bool], int] = Ellipsis |
| 171 | + mask: slice = Ellipsis |
175 | 172 | ): |
176 | 173 | """ |
177 | 174 | Generates a sub-catalogue object with the correct properties set. |
@@ -262,7 +259,7 @@ def __init__( |
262 | 259 | filename: str, |
263 | 260 | disregard_units: bool = False, |
264 | 261 | extra_registration_functions: Union[None, Dict[str, Callable]] = None, |
265 | | - mask: Union['builtins.ellipsis', NDArray[bool], int] = Ellipsis, |
| 262 | + mask: slice = Ellipsis, |
266 | 263 | ): |
267 | 264 | """ |
268 | 265 | Initialise the velociraptor catalogue with all of the available |
@@ -290,7 +287,7 @@ def __init__( |
290 | 287 | conform to the registration function API. This is an advanced |
291 | 288 | feature. |
292 | 289 |
|
293 | | - mask: Union['builtins.ellipsis', NDArray[bool], int], optional |
| 290 | + mask: slice, optional |
294 | 291 | If a boolean array is provided, it is used to mask all catalogue |
295 | 292 | arrays. If an int is provided, catalogue arrays are masked to the |
296 | 293 | single corresponding element. Default: Ellipsis (``...``). |
|
0 commit comments