def copy_to_device(self, ary, stream=0):
        '''
        Copy from the provided array into this array.

        This may be less forgiving than the CUDA Python implementation, which
        will copy data up to the length of the smallest of the two arrays,
        whereas this expects the size of the arrays to be equal.
        '''
        try:
            np.copyto(self._ary, ary)
        except __HOLE__:
            self._ary[:] = ary
dataset/ETHPy150Open numba/numba/numba/cuda/simulator/array.py/FakeCUDAArray.copy_to_device