Skip to content

Commit df203f8

Browse files
committed
revert BezierSegment changes, not for this PR
1 parent c877075 commit df203f8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/matplotlib/bezier.py

+6-7
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-
for i in range(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+
for i in range(n)]
233+
self._px = np.asarray(control_points).T * coeff
235234

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

0 commit comments

Comments
 (0)