What is the fastest way to copy data from array b to array a, without modifying the address of array a. I need this because an external library (PyFFTW) uses a pointer to my
NumPy version 1.7 has the numpy.copyto function that does what you are looking for:
numpy.copyto
numpy.copyto(dst, src) Copies values from one array to another, broadcasting as necessary.
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