{"id":27615,"library":"bezier","title":"Bezier","description":"Helper for Bézier Curves, Triangles, and Higher Order Objects. Pure Python and compiled backend for computing with Bézier curves, triangles, surfaces, and volumes. Current version 2024.6.20, requires Python >=3.10. Released approximately yearly since 2017.","status":"active","version":"2024.6.20","language":"python","source_language":"en","source_url":"https://github.com/dhermes/bezier","tags":["bezier","curves","surfaces","geometry","numerical"],"install":[{"cmd":"pip install bezier","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for array operations and geometry computations","package":"numpy","optional":false}],"imports":[{"note":"Class named Curve, not BezierCurve, since v0.9.0","wrong":"from bezier import BezierCurve","symbol":"BezierCurve","correct":"from bezier import Curve"},{"note":"Surface renamed to Triangle in v2020.1.14","wrong":"from bezier import Surface","symbol":"Triangle","correct":"from bezier import Triangle"},{"note":"Function renamed to intersection_curves_curves","wrong":"from bezier import intersect","symbol":"intersections","correct":"from bezier import intersection_curves_curves"}],"quickstart":{"code":"import numpy as np\nfrom bezier import Curve\n\nnodes = np.asfortranarray([\n    [0.0, 0.5, 1.0],\n    [0.0, 1.0, 0.0],\n])\ncurve = Curve(nodes, degree=2)\nprint(curve.evaluate(0.5))","lang":"python","description":"Create and evaluate a quadratic Bézier curve defined by three control points."},"warnings":[{"fix":"Replace `Surface` with `Triangle` in imports and usage.","message":"Surface class renamed to Triangle in v2020.1.14. Code using `Surface` will break.","severity":"breaking","affected_versions":"<2020.1.14"},{"fix":"Always pass nodes as Fortran-contiguous arrays: `nodes = np.asfortranarray(...)`","message":"Nodes array must be Fortran-contiguous (column-major). Use `np.asfortranarray` or ensure array is C-contiguous with correct shape.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade Python to 3.10 or later.","message":"Python 3.9 support dropped, requires >=3.10 as of v2024.6.20.","severity":"deprecated","affected_versions":">=2024.6.20"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install bezier` in the correct Python environment.","cause":"Package not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'bezier'"},{"fix":"Ensure nodes is 2D with shape (dims, points) and convert to Fortran order using `np.asfortranarray(nodes)`.","cause":"Nodes array not shaped as (num_axes, num_nodes) or not Fortran-contiguous.","error":"ValueError: nodes must be 2D array (num_axes, num_nodes)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}