[Numpy-discussion] newbie question (curve fitting Z=f(X,Y))

2011-01-03 Thread Sachin Kumar Sharma
Hi, Absolute basic question I want to do following *Read data from excel sheet (three columns - X,Y,Z) *Curve fit a function Z=F(X,Y) *Plot X Vs Z (from data) and plot X Vs Z (from curve fit) Kindly advise me how to write a basic python script for the same. Thanks &

Re: [Numpy-discussion] numpy installation

2011-01-03 Thread Paul Ivanov
Waqar Rashid, on 2011-01-02 00:38, wrote: > Hi, > > trying to install numpy on MacOS with python 3.1 > > Having installation issues. Has anyone managed to install this on the Mac? > > regards > Waqar - you sent this to the IPython-User list, but I think you probably meant to send it to the n

Re: [Numpy-discussion] Rolling window (moving average, moving std, and more)

2011-01-03 Thread Erik Rigtorp
On Mon, Jan 3, 2011 at 11:26, Eric Firing wrote: > Instead of calculating statistics independently each time the window is > advanced one data point, the statistics are updated.  I have not done > any benchmarking, but I expect this approach to be quick. This might accumulate numerical errors. Bu

Re: [Numpy-discussion] Rolling window (moving average, moving std, and more)

2011-01-03 Thread Eric Firing
On 12/31/2010 06:29 PM, Erik Rigtorp wrote: > Hi, > > Implementing moving average, moving std and other functions working > over rolling windows using python for loops are slow. This is a > effective stride trick I learned from Keith Goodman's > Bottleneck code but generalized into arrays of > an

Re: [Numpy-discussion] Rolling window (moving average, moving std, and more)

2011-01-03 Thread Erik Rigtorp
On Mon, Jan 3, 2011 at 10:52, Keith Goodman wrote: > On Mon, Jan 3, 2011 at 7:41 AM, Erik Rigtorp wrote: >> On Mon, Jan 3, 2011 at 10:36, Keith Goodman wrote: >>> On Mon, Jan 3, 2011 at 5:37 AM, Erik Rigtorp wrote: >>> It's only a view of the array, no copying is done. Though some ope

Re: [Numpy-discussion] Rolling window (moving average, moving std, and more)

2011-01-03 Thread Keith Goodman
On Mon, Jan 3, 2011 at 7:41 AM, Erik Rigtorp wrote: > On Mon, Jan 3, 2011 at 10:36, Keith Goodman wrote: >> On Mon, Jan 3, 2011 at 5:37 AM, Erik Rigtorp wrote: >> >>> It's only a view of the array, no copying is done. Though some >>> operations like np.std()  will copy the array, but that's more

Re: [Numpy-discussion] Rolling window (moving average, moving std, and more)

2011-01-03 Thread Erik Rigtorp
On Mon, Jan 3, 2011 at 10:36, Keith Goodman wrote: > On Mon, Jan 3, 2011 at 5:37 AM, Erik Rigtorp wrote: > >> It's only a view of the array, no copying is done. Though some >> operations like np.std()  will copy the array, but that's more of a >> bug. In general It's hard to imagine any speedup g

Re: [Numpy-discussion] Rolling window (moving average, moving std, and more)

2011-01-03 Thread Keith Goodman
On Mon, Jan 3, 2011 at 5:37 AM, Erik Rigtorp wrote: > It's only a view of the array, no copying is done. Though some > operations like np.std()  will copy the array, but that's more of a > bug. In general It's hard to imagine any speedup gains by copying a > 10GB array. I don't think that np.std

Re: [Numpy-discussion] Rolling window (moving average, moving std, and more)

2011-01-03 Thread Keith Goodman
On Fri, Dec 31, 2010 at 8:29 PM, Erik Rigtorp wrote: > Implementing moving average, moving std and other functions working > over rolling windows using python for loops are slow. This is a > effective stride trick I learned from Keith Goodman's > Bottleneck code but generalized into arrays of >

Re: [Numpy-discussion] Rolling window (moving average, moving std, and more)

2011-01-03 Thread Erik Rigtorp
On Mon, Jan 3, 2011 at 05:13, Sebastian Haase wrote: > Hi Erik, > This is really neat !  Do I understand correctly, that you mean by > "stride tricks", that your rolling_window is _not_ allocating any new > memory ? Yes, it's only a view. > IOW, If I have a large array using 500MB of memory, say

Re: [Numpy-discussion] Rolling window (moving average, moving std, and more)

2011-01-03 Thread Sebastian Haase
Hi Erik, This is really neat ! Do I understand correctly, that you mean by "stride tricks", that your rolling_window is _not_ allocating any new memory ? IOW, If I have a large array using 500MB of memory, say of float32 of shape 125,1000,1000 and I want the last axis rolling of window size 11, wh