Skip to content

Commit ea93bc2

Browse files
committed
Display a warning when using deprecated Bezier function
1 parent 205e26d commit ea93bc2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

viscm/bezierbuilder/curve.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import warnings
2+
13
import numpy as np
24
from scipy.special import binom
35

@@ -13,9 +15,13 @@ def _bpoly(x):
1315

1416

1517
def Bezier(points, at):
16-
"""Build Bézier curve from points.
17-
Deprecated. CatmulClark builds nicer splines
18-
"""
18+
"""Build Bézier curve from points."""
19+
warnings.warn(
20+
message="Deprecated. CatmulClark builds nicer splines.",
21+
category=FutureWarning,
22+
stacklevel=1,
23+
)
24+
1925
at = np.asarray(at)
2026
at_flat = at.ravel()
2127
N = len(points)

0 commit comments

Comments
 (0)