cupy.asnumpy#
- cupy.asnumpy(a, stream=None, order='C', out=None)[source]#
Returns an array on the host memory from an arbitrary source array.
- Parameters:
a – Arbitrary object that can be converted to
numpy.ndarray.stream (cupy.cuda.Stream) – CUDA stream object. If it is specified, then the device-to-host copy runs asynchronously. Otherwise, the copy is synchronous. Note that if
ais not acupy.ndarrayobject, then this argument has no effect.order ({'C', 'F', 'A'}) – The desired memory layout of the host array. When
orderis ‘A’, it uses ‘F’ ifais fortran-contiguous and ‘C’ otherwise.out (numpy.ndarray) – The output array to be written to. It must have compatible shape and dtype with those of
a’s.
- Returns:
Converted array on the host memory.
- Return type: