cupy.asnumpy(a, stream=None, order='C')[source]

Returns an array on the host memory from an arbitrary source array.

  • 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 a is not a cupy.ndarray object, then this argument has no effect.
  • order ({'C', 'F', 'A'}) – The desired memory layout of the host array. When order is ‘A’, it uses ‘F’ if a is fortran-contiguous and ‘C’ otherwise.

Converted array on the host memory.

Return type: