{"library":"splinebox","title":"Splinebox","type":"library","description":"Splinebox is an open-source Python package for fitting splines. It offers a wide variety of spline types, including Hermite splines, and makes it easy to specify custom loss functions to control spline properties such as smoothness. Currently at version 0.5.1, the library is actively developed with a steady release cadence.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install splinebox"],"cli":null},"imports":["import splinebox","from splinebox.spline_curves import Spline","from splinebox.basis_functions import B3"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/EPFL-Center-for-Imaging/splinebox","docs":null,"changelog":null,"pypi":"https://pypi.org/project/splinebox/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"import splinebox\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Define the number of knots and the basis function\nn_knots = 4\nbasis_function = splinebox.basis_functions.B3()\n\n# Create a closed cubic B-spline with initial knots\nspline = splinebox.spline_curves.Spline(M=n_knots, basis_function=basis_function, closed=True)\nspline.knots = np.array([[1, 2], [3, 2], [4, 3], [1, 1]])\n\n# Evaluate the spline at parameter values\nt = np.linspace(0, n_knots, 100) # Parameter values along the spline\nvals = spline(t, derivative=0) # Get the spline points\n\n# Plot the spline and its knots\nplt.figure(figsize=(6, 6))\nplt.scatter(spline.knots[:, 0], spline.knots[:, 1], color='red', marker='o', label='Knots')\nplt.plot(vals[:, 0], vals[:, 1], color='blue', label='Spline Curve')\nplt.title('Splinebox Quickstart Example')\nplt.xlabel('X-coordinate')\nplt.ylabel('Y-coordinate')\nplt.grid(True)\nplt.legend()\nplt.axis('equal')\nplt.show()","lang":"python","description":"This quickstart demonstrates how to create and visualize a closed cubic B-spline using Splinebox. It defines a set of control points (knots), instantiates a Spline object with a B3 basis function, evaluates the spline along a range of parameter values, and then plots both the knots and the resulting spline curve using Matplotlib.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":"1.0.0","pypi_latest":"1.0.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":50,"avg_install_s":10.6,"avg_import_s":19.34,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"splinebox","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"splinebox","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":10.2,"import_time_s":19.9,"mem_mb":72.6,"disk_size":"411M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"splinebox","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"splinebox","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":10.4,"import_time_s":22.69,"mem_mb":80,"disk_size":"432M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"splinebox","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"splinebox","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":10.5,"import_time_s":20.28,"mem_mb":75.1,"disk_size":"417M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"splinebox","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"splinebox","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":10.5,"import_time_s":19.4,"mem_mb":77.4,"disk_size":"415M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"splinebox","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"splinebox","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":11.4,"import_time_s":14.41,"mem_mb":60.3,"disk_size":"386M"}]}}