On 1/23/2010 7:29 PM, Anne Archibald wrote: > I had in mind accessing the underlying data through views > that were flat: > > In [3]: x = np.random.random((1000,1000)) > > In [4]: y = np.random.random((1000,1000)) > > In [5]: xf = x.view() > > In [6]: xf.shape = (-1,) > > In [7]: yf = y.view() > > In [8]: yf.shape = (-1,) > > In [9]: yf[:] = xf[:]
Yup, that's a bit faster. Thanks, Alan _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion