thouis / numpy-trac-migration

numpy Trac to github issues migration
2 stars 3 forks source link

Library for padding arrays (migrated from Trac #655) #2208

Open thouis opened 12 years ago

thouis commented 12 years ago

Original ticket http://projects.scipy.org/numpy/ticket/655 Reported 2008-02-11 by trac user timcera, assigned to atmention:stefanv.

The attached pad module contains a group of functions to pad values onto the edges of an n-dimensional array. I use it for FFT analysis in TAPPy (http://tappy.sf.net) to have some hope of reasonable values all the way to the edge of the array. I thought it might be useful.

thouis commented 12 years ago

Attachment in Trac by trac user timcera, 2008-02-11: pad.tar.gz

thouis commented 12 years ago

Comment in Trac by atmention:stefanv, 2008-04-09

thouis commented 12 years ago

Comment in Trac by trac user peridot, 2008-04-09

The patch is actually a more-or-less self-contained python package. The best thing to do is probably to drop it in as numpy.pad (particularly as it has functions like numpy.pad.maximum). It includes tests and documentation (albeit not exaclty in numpy standard format) so it's really a packaging issue.

The package makes it easy to pad vectors on one end or the other with an arbitrary number of values, with wrapped or reflected values, or mean/median/maximum/minimum values of the whole array or part of it.

thouis commented 12 years ago

Comment in Trac by trac user timcera, 2008-08-22

Replying to [comment:2 peridot]:

The patch is actually a more-or-less self-contained python package. The best thing to do is probably to drop it in as numpy.pad (particularly as it has functions like numpy.pad.maximum). It includes tests and documentation (albeit not exaclty in numpy standard format) so it's really a packaging issue.

Thank you for looking at 'pad'. I followed the scipy/numpy standards (as near as I could make them out) from the time that I first started programming 'pad' with the intent of it being a drop in module. I can update to the latest standards if that would ease addition to numpy.

The package makes it easy to pad vectors on one end or the other with an arbitrary number of values, with wrapped or reflected values, or mean/median/maximum/minimum values of the whole array or part of it.

Actually, more than vectors, it can pad N-dimensional arrays. It is useful for any FFT (1 or 2D), plus any convolution or digital filter.

thouis commented 12 years ago

Attachment in Trac by trac user timcera, 2008-09-04: pad-0.2.1.tar.gz

thouis commented 12 years ago

Comment in Trac by trac user timcera, 2008-09-04

Just uploaded new version.

Now updated to new Numpy tests and improved documentation. I also changed the names of functions from, for example, 'maximum' to 'with_maximum'. The changed names I thought would clarify from other function names in Numpy.

thouis commented 12 years ago

Comment in Trac by atmention:cournape, 2009-03-02

Stefan, I think you were interested in this, if you could take a look. If you don't have time, just put it to unscheduled,

thouis commented 12 years ago

Comment in Trac by atmention:cournape, 2009-03-09

thouis commented 12 years ago

Comment in Trac by atmention:cournape, 2009-03-09

thouis commented 12 years ago

Comment in Trac by atmention:rgommers, 2011-03-30