Skip to content

bagof.converters.cupy

Converters for cupy array types.

Classes

ToCupyArray

ToCupyArray(hint: Any = UNSET, compose: bool = False)

Bases: ArrayConverter

Converter for [cupy.ndarray][].

A lazy (dask) array is computed, and a host (numpy) array is copied to the device, so that an array of any library converts.

Methods:

move
move(value: Any) -> Any

Compute a lazy array (cupy.asanyarray does the rest).