How to copy data from a numpy array to another
I believe
a = numpy.empty_like(b)
a[:] = b
will copy the values quickly. As Funsi mentions, recent versions of numpy also have the copyto
function.
NumPy version 1.7 has the numpy.copyto
function that does what you are looking for:
numpy.copyto(dst, src)
Copies values from one array to another, broadcasting as necessary.
See: https://docs.scipy.org/doc/numpy/reference/generated/numpy.copyto.html