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 6429e9d commit df0cde3Copy full SHA for df0cde3
1 file changed
examples/event_handling/resample.py
@@ -25,7 +25,7 @@ def downsample(self, xstart, xend):
25
mask = (self.origXData > xstart) & (self.origXData < xend)
26
# dilate the mask by one to catch the points just outside
27
# of the view range to not truncate the line
28
- mask = np.convolve([1, 1], mask, mode='same').astype(bool)
+ mask = np.convolve([1, 1, 1], mask, mode='same').astype(bool)
29
# sort out how many points to drop
30
ratio = max(np.sum(mask) // self.max_points, 1)
31
0 commit comments