cupy.copyto#

cupy.copyto(dst, src, casting='same_kind', where=None)[source]#

Copies values from one array to another with broadcasting.

This function can be called for arrays on different devices. In this case, casting, where, and broadcasting is not supported, and an exception is raised if these are used.

Parameters
  • dst (cupy.ndarray) – Target array.

  • src (cupy.ndarray) – Source array.

  • casting (str) – Casting rule. See numpy.can_cast() for detail.

  • where (cupy.ndarray of bool) – If specified, this array acts as a mask, and an element is copied only if the corresponding element of where is True.

See also

numpy.copyto()