Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitdf203f8

Browse files
committed
revert BezierSegment changes, not for this PR
1 parentc877075 commitdf203f8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

‎lib/matplotlib/bezier.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,12 @@ class BezierSegment:
225225
"""
226226

227227
def__init__(self,control_points):
228-
self.cpoints=np.asarray(control_points)
229-
self.n,self.d=self.cpoints.shape
230-
self._orders=np.arange(self.n)
231-
coeff= [math.factorial(self.n-1)
232-
// (math.factorial(i)*math.factorial(self.n-1-i))
233-
foriinrange(self.n)]
234-
self._px=self.cpoints.T*coeff
228+
n=len(control_points)
229+
self._orders=np.arange(n)
230+
coeff= [math.factorial(n-1)
231+
// (math.factorial(i)*math.factorial(n-1-i))
232+
foriinrange(n)]
233+
self._px=np.asarray(control_points).T*coeff
235234

236235
defpoint_at_t(self,t):
237236
"""Return the point on the Bezier curve for parameter *t*."""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp