Re: [Numpy-discussion] broadcasting with numpy.interp

2010-12-02 Thread Friedrich Romstedt
2010/12/1 greg whittier : > On Wed, Nov 24, 2010 at 3:16 PM, Friedrich Romstedt > wrote: >> I assume you just need *some* interpolation, not that specific one? >> In that case, I'd suggest the following: >> >> 1)  Use a 2d interpolation, taking into account all nearest neighbours. >> 2)  For this,

Re: [Numpy-discussion] broadcasting with numpy.interp

2010-12-01 Thread greg whittier
On Wed, Nov 24, 2010 at 3:16 PM, Friedrich Romstedt < friedrichromst...@gmail.com> wrote: > 2010/11/16 greg whittier : > > I'd like to be able to speed up the following code. > > > > def replace_dead(cube, dead): > > # cube.shape == (320, 640, 1200) > > # dead.shape == (320, 640) > > # cube[

Re: [Numpy-discussion] broadcasting with numpy.interp

2010-11-24 Thread Friedrich Romstedt
2010/11/16 greg whittier : > I'd like to be able to speed up the following code. > > def replace_dead(cube, dead): >   # cube.shape == (320, 640, 1200) >   # dead.shape == (320, 640) >   # cube[i,j,:] are bad points to be replaced via interpolation if > dead[i,j] == True > >    bands = np.arange(0,

[Numpy-discussion] broadcasting with numpy.interp

2010-11-16 Thread greg whittier
Hi all, I'd like to be able to speed up the following code. def replace_dead(cube, dead): # cube.shape == (320, 640, 1200) # dead.shape == (320, 640) # cube[i,j,:] are bad points to be replaced via interpolation if dead[i,j] == True bands = np.arange(0, cube.shape[0]) for line i