[Numpy-discussion] speedy remove mean of rows
jdhunter at ace.bsd.uchicago.edu
Thu Feb 27 20:27:15 CST 2003
I have a large (40,000 x 128) Numeric array, X, with typecode Float.
In some cases the number of rows may be approx 10x greater.
I want to create an array Y with the same dimensions as X, where each
element of Y is the corresponding element of X with the mean of the
row on which it occurs subtracted away. Ie,
Y = X - transpose(resize(mean(X,1), (X.shape,X.shape)))
I am wondering if this is the most efficient way (speed and memory).
Thanks for any suggestions,
More information about the Numpy-discussion