Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfbc39d commit 9d3b468Copy full SHA for 9d3b468
1 file changed
lib/matplotlib/tests/test_agg.py
@@ -165,7 +165,9 @@ def test_agg_filter():
165
def smooth1d(x, window_len):
166
# copied from http://www.scipy.org/Cookbook/SignalSmooth
167
168
- s = np.r_[2*x[0] - x[window_len:1:-1], x, 2*x[-1] - x[-1:-window_len:-1]]
+ s = np.r_[2*x[0] - x[window_len:1:-1],
169
+ x,
170
+ 2*x[-1] - x[-1:-window_len:-1]]
171
w = np.hanning(window_len)
172
y = np.convolve(w/w.sum(), s, mode='same')
173
return y[window_len-1:-window_len+1]
@@ -182,7 +184,6 @@ def smooth2d(A, sigma=3):
182
184
class BaseFilter(object):
183
185
def prepare_image(self, src_image, dpi, pad):
186
ny, nx, depth = src_image.shape
- #tgt_image = np.zeros([pad*2+ny, pad*2+nx, depth], dtype="d")
187
padded_src = np.zeros([pad*2 + ny, pad*2 + nx, depth], dtype="d")
188
padded_src[pad:-pad, pad:-pad, :] = src_image[:, :, :]
189
0 commit comments