From 252bacb89d2a9b65ce176ca290c6b03518471c9b Mon Sep 17 00:00:00 2001 From: Yousef Moazzam Date: Wed, 16 Oct 2024 12:09:48 +0100 Subject: [PATCH] Use `Union` for a union type involving `h5py` See #492 for more details --- httomo/data/padding.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/httomo/data/padding.py b/httomo/data/padding.py index 678651814..fe3e28532 100644 --- a/httomo/data/padding.py +++ b/httomo/data/padding.py @@ -1,4 +1,4 @@ -from typing import Optional +from typing import Optional, Union import h5py import numpy as np @@ -10,7 +10,7 @@ def extrapolate_before( - global_data: h5py.Dataset | np.ndarray, + global_data: Union[h5py.Dataset, np.ndarray], block_data: np.ndarray, slices: int, dim: int, @@ -50,7 +50,7 @@ def extrapolate_before( def extrapolate_after( - global_data: h5py.Dataset | np.ndarray, + global_data: Union[h5py.Dataset, np.ndarray], block_data: np.ndarray, slices: int, dim: int,