[SciPy-dev] Utility to pad a matrix
timcera at earthlink.net
Fri Aug 26 00:20:19 CDT 2005
Please find at http://www.scipy.org/Members/timcera/pad-0.1.tar.gz/download
a utility to pad an n-dimensional matrix. You can pad with the mean, median,
maximum, or minimum of each vector along each axis or just use a portion of
the vector near the edges. You can also assign a constant to the pad values,
or ramp from the edge value to a constant, or mirror along the edge values,
or pad with values wrapped from the other end of the vector.
I had an earlier version that I was using for rank-1 matrices, but I have
extended the padding functions to n-dimensions. Now that pad can work with
n-dimensional matrics, I have hopes that pad (or something like it) could be
a utility used by FFT, convolution, and filter functions. Some of these
functions support some forms of padding internally, most do not.
More information about the Scipy-dev