File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1212from os import cpu_count
1313from functools import partial
1414from pathlib import Path
15- from typing import Callable , TypeVar
15+ from typing import Callable , TypeVar , Union
1616
1717import numpy as np
1818from nibabel .loadsave import load as _nbload
@@ -144,8 +144,8 @@ async def _apply_serial(
144144
145145def apply (
146146 transform : TransformBase ,
147- spatialimage : str | Path | SpatialImage ,
148- reference : str | Path | SpatialImage = None ,
147+ spatialimage : Union [ str , Path , SpatialImage ] ,
148+ reference : Union [ str , Path , SpatialImage ] = None ,
149149 order : int = 3 ,
150150 mode : str = "constant" ,
151151 cval : float = 0.0 ,
@@ -154,7 +154,7 @@ def apply(
154154 dtype_width : int = 8 ,
155155 serialize_nvols : int = SERIALIZE_VOLUME_WINDOW_WIDTH ,
156156 max_concurrent : int = min (cpu_count (), 12 ),
157- ) -> SpatialImage | np .ndarray :
157+ ) -> Union [ SpatialImage , np .ndarray ] :
158158 """
159159 Apply a transformation to an image, resampling on the reference spatial object.
160160
You can’t perform that action at this time.
0 commit comments