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

Commitca69d46

Browse files
committed
vectorize _comb with decorator syntax
1 parent489fb19 commitca69d46

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎lib/matplotlib/bezier.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
importmatplotlib.cbookascbook
1111

1212
# same algorithm as 3.8's math.comb
13+
@np.vectorize
1314
def_comb(n,k):
1415
k=min(k,n-k)
1516
i=np.arange(1,k+1)
1617
returnnp.prod((n+1-i)/i).astype(int)
17-
_comb=np.vectorize(_comb)
18+
1819

1920
classNonIntersectingPathException(ValueError):
2021
pass
@@ -220,6 +221,7 @@ def find_bezier_t_intersecting_with_closedpath(
220221
start=middle
221222
start_inside=middle_inside
222223

224+
223225
classBezierSegment:
224226
"""
225227
A d-dimensional Bezier segment.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp