We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c877075 commit df203f8Copy full SHA for df203f8
lib/matplotlib/bezier.py
@@ -225,13 +225,12 @@ class BezierSegment:
225
"""
226
227
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
+ n = len(control_points)
+ self._orders = np.arange(n)
+ coeff = [math.factorial(n - 1)
+ // (math.factorial(i) * math.factorial(n - 1 - i))
+ for i in range(n)]
+ self._px = np.asarray(control_points).T * coeff
235
236
def point_at_t(self, t):
237
"""Return the point on the Bezier curve for parameter *t*."""
0 commit comments