Skip to content

Commit 205e26d

Browse files
committed
Remove re-implemented scipy.special.binom function
1 parent bbd66aa commit 205e26d

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

viscm/bezierbuilder/curve.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
from math import factorial
2-
31
import numpy as np
4-
5-
6-
def binom(n, k):
7-
"""Re-implement `scipy.special.binom`.
8-
9-
Reimplementing it ourself lets us avoid pulling in a dependency scipy just for that
10-
one function.
11-
12-
FIXME: `scipy` is already a dependency. Delete this?
13-
"""
14-
return factorial(n) * 1.0 / (factorial(k) * factorial(n - k))
2+
from scipy.special import binom
153

164

175
def Bernstein(n, k):

0 commit comments

Comments
 (0)