diff --git a/pyclesperanto_prototype/_tier0/_types.py b/pyclesperanto_prototype/_tier0/_types.py index 7941d18c..474dd70a 100644 --- a/pyclesperanto_prototype/_tier0/_types.py +++ b/pyclesperanto_prototype/_tier0/_types.py @@ -3,7 +3,12 @@ import pyopencl as cl from typing import Union -Image = Union[np.ndarray, OCLArray, cl.Image, _OCLImage] +try: + import pyclesperanto + Image = Union[np.ndarray, OCLArray, cl.Image, _OCLImage, pyclesperanto._pyclesperanto._Array] +except ImportError: + Image = Union[np.ndarray, OCLArray, cl.Image, _OCLImage] + def is_image(object): return isinstance(object, np.ndarray) or \