itkwasm.to_cupy_array#

Module Contents#

Functions#

is_cupy_array

Check if the input is a CuPy array.

array_like_to_cupy_array

Convert a numpy array-like to a cupy ndarray.

API#

itkwasm.to_cupy_array.is_cupy_array(arr: numpy.typing.ArrayLike) bool#

Check if the input is a CuPy array.

Parameters:

arr (ArrayLike) – Input array

Returns:

True if the input is a CuPy array

Return type:

bool

itkwasm.to_cupy_array.array_like_to_cupy_array(arr: numpy.typing.ArrayLike) cupy.ndarray#

Convert a numpy array-like to a cupy ndarray.

Parameters:

arr (ArrayLike) – numpy ndarray like

Returns:

cupy array

Return type:

cp.ndarray