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.

Leave a Comment