Skip to content

Commit ff22896

Browse files
authored
Merge pull request #1080 from thewtex/cupy-check
fix(itkwasm): fix check for cupy
2 parents 8ec3a2f + 80db18c commit ff22896

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/core/python/itkwasm/itkwasm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""itkwasm: Python interface to itk-wasm WebAssembly modules."""
22

3-
__version__ = "1.0b168"
3+
__version__ = "1.0b169"
44

55
from .interface_types import InterfaceTypes
66
from .image import Image, ImageType

packages/core/python/itkwasm/itkwasm/to_cupy_array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from numpy.typing import ArrayLike
88

99
try:
10-
distribution('cupy')
10+
import cupy
1111
_CUPY_AVAILABLE = True
1212
except:
1313
_CUPY_AVAILABLE = False
@@ -50,4 +50,4 @@ def array_like_to_cupy_array(arr: ArrayLike) -> "cp.ndarray":
5050
arr = arr.compute()
5151
if isinstance(arr, cp.ndarray):
5252
return arr
53-
return cp.array(arr)
53+
return cp.array(arr)

0 commit comments

Comments
 (0)