Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e341b26

Browse filesBrowse files
authored
Merge pull request #19303 from chbauman/patch-1
Extended the convolution filter for correct dilation
2 parents 07d4530 + df0cde3 commit e341b26
Copy full SHA for e341b26

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎examples/event_handling/resample.py

Copy file name to clipboardExpand all lines: examples/event_handling/resample.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def downsample(self, xstart, xend):
2525
mask = (self.origXData > xstart) & (self.origXData < xend)
2626
# dilate the mask by one to catch the points just outside
2727
# of the view range to not truncate the line
28-
mask = np.convolve([1, 1], mask, mode='same').astype(bool)
28+
mask = np.convolve([1, 1, 1], mask, mode='same').astype(bool)
2929
# sort out how many points to drop
3030
ratio = max(np.sum(mask) // self.max_points, 1)
3131

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.