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 63bee22

Browse filesBrowse files
authored
Merge pull request #18182 from meeseeksmachine/auto-backport-of-pr-17994-on-v3.3.x
Backport PR #17994 on branch v3.3.x (Special case degree-1 Bezier curves.)
2 parents 1dbc782 + 11b5e18 commit 63bee22
Copy full SHA for 63bee22

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-2
lines changed

‎lib/matplotlib/bezier.py

Copy file name to clipboardExpand all lines: lib/matplotlib/bezier.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ def axis_aligned_extrema(self):
288288
0`
289289
"""
290290
n = self.degree
291+
if n <= 1:
292+
return np.array([]), np.array([])
291293
Cj = self.polynomial_coefficients
292294
dCj = np.arange(1, n+1)[:, None] * Cj[1:]
293-
if len(dCj) == 0:
294-
return np.array([]), np.array([])
295295
dims = []
296296
roots = []
297297
for i, pi in enumerate(dCj.T):

0 commit comments

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