Skip to content

Commit

Permalink
adding pyclesperanto Array to Image type
Browse files Browse the repository at this point in the history
  • Loading branch information
haesleinhuepf committed Sep 29, 2024
1 parent 620ae07 commit 8ca80dd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pyclesperanto_prototype/_tier0/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 8ca80dd

Please sign in to comment.