$npx skillfedfor your agent

piecewise-rational

Shape-preserving piecewise rational cubic interpolation (Delbourgo-Gregory algorithm)

With conditionsPyPI MathematicsReleased Jan 2026158.1K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — piecewise_rational-1.0.0-py3-none-any.whl
v1.0.0 · released 2026-01-13 · Python <4.0,>=3.9

Yes, if you need shape-preserving rational cubic interpolation and have endpoint derivatives available. The package is lightweight, permissively licensed, and implements a well-established algorithm. However, it is aging (no updates since initial release) and has minimal adoption; consider it only if standard cubic splines or other interpolation libraries do not meet your shape-preservation requirements.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later (supports 3.9, 3.10, 3.11, 3.12, 3.13).
  • Low install friction; pure Python wheel with no runtime dependencies.
  • Package is aging (213 days since release) with no recent commits beyond initial publication, though the repository remains active and unarchived.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and retain copyright notices in distributions.

last release 2026-01-13 (213 days) · last repo commit 2026-01-13

0 known vulnerabilities (OSV.dev, 2026-08-14) · 158,134 downloads/mo, #10,734 on PyPI

Verify before relying

from piecewise_rational import rational_cubic_interpolation

# Interpolate at x=0.5 given interval [0.0, 1.0], endpoint values, derivatives, and control parameter
y = rational_cubic_interpolation(0.5, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 0.0)
  • Practical performance characteristics and numerical stability compared to standard cubic spline methods.
  • Whether the control parameter r has documented guidance for typical use cases.
  • Real-world accuracy and speed on large datasets or high-dimensional problems.
Same gist for agents: .md · .json

What it is and what it does

piecewise-rational implements the Delbourgo-Gregory algorithm for rational cubic interpolation, a method that constructs smooth curves through data points while preserving shape properties like monotonicity and convexity. Unlike standard polynomial splines, rational cubic interpolation uses rational functions (ratios of polynomials) within each interval, offering better control over curve behavior and the ability to fit second derivatives through a control parameter.

The package provides a single core function, rational_cubic_interpolation, that takes an x-coordinate to evaluate, the interval endpoints, endpoint values, endpoint derivatives, and a control parameter, returning the interpolated y-value. It has no external runtime dependencies and installs as a pure Python wheel, making it lightweight for integration into numerical or scientific workflows where shape preservation matters more than standard smoothing.

Use it for

  • Interpolating financial time-series data while preserving monotonicity in yield curves or volatility surfaces.
  • Reconstructing smooth curves from scattered measurements in engineering or physics where convexity must be maintained.
  • Building smooth interpolants for optimization problems where derivative information is available at sample points.
  • Fitting curves through data with known monotonicity constraints, such as cumulative distributions or calibration curves.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need shape-preserving rational cubic interpolation and have endpoint derivatives available.

The package is lightweight, permissively licensed, and implements a well-established algorithm. However, it is aging (no updates since initial release) and has minimal adoption; consider it only if standard cubic splines or other interpolation libraries do not meet your shape-preservation requirements.

Install

piecewise-rational on PyPI

Before you install

Low install friction; pure Python wheel with no runtime dependencies. Package is aging (213 days since release) with no recent commits beyond initial publication, though the repository remains active and unarchived.

Requires Python 3.9 or later (supports 3.9, 3.10, 3.11, 3.12, 3.13).

License in practice

MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and retain copyright notices in distributions.

Quickstart

from piecewise_rational import rational_cubic_interpolation

# Interpolate at x=0.5 given interval [0.0, 1.0], endpoint values, derivatives, and control parameter
y = rational_cubic_interpolation(0.5, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 0.0)

Verify before relying

  • Practical performance characteristics and numerical stability compared to standard cubic spline methods.
  • Whether the control parameter r has documented guidance for typical use cases.
  • Real-world accuracy and speed on large datasets or high-dimensional problems.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4.0,>=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 213 days since the last release
Last repo commit
First released
Downloads158,134 / month, #10,734 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Evidence: piecewise_rational-1.0.0-py3-none-any.whl

Tags

Capabilities
rational cubic interpolationshape preserving interpolationmonotonic interpolationpiecewise rational curvesDelbourgo-Gregory algorithmconvex interpolationcubic spline alternative
Topics
numerical-methodsinterpolationscientific-computing
PyPI keywords
interpolationrational cubicshape preservingmonotonicconvex

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “rational cubic interpolation”

  • piecewise-rationalPerforms shape-preserving piecewise rational cubic interpolation…
  • resize-rightResizes images or tensors in NumPy or PyTorch with differentiable…
  • pytweeningPyTweening provides a collection of easing (tweening) functions that…

Give your agent the search over MCP, or paste the wish link into any chat.

More Mathematics packages

networkx Worth it
PyPI · Python Modules · released Dec 2025

NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.

BSD-3-Clausepure Python
290.9Mdownloads / mo
kiwisolver Worth it
PyPI · Mathematics · released Mar 2026

kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.

Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.

BSD-3-Clausecompiled wheel · 3.10+
205.5Mdownloads / mo
sympy Worth it
PyPI · Scientific/Engineering · released Apr 2025

SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.

BSD-3-Clausepure Python · 3.9+
196.4Mdownloads / mo
contourpy Worth it
PyPI · Information Analysis · released Jul 2025

ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.

BSD-3-Clausecompiled wheel · 3.11+
191.2Mdownloads / mo
torch With conditions
PyPI · Software Development · released Jul 2026

PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.

Apache-2.0 AND Apache-2.0 WITH LLVM-exception AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND MITcompiled wheel · 3.10+
102.5Mdownloads / mo
onnxruntime Worth it
PyPI · Software Development · released Jul 2026

onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.

Install it if you have ONNX models to run in production or development.

MITcompiled wheel · 3.11+
89.3Mdownloads / mo

See also py-lets-be-rational · ropwr · cu2qu · pytweening · piecewise-regression · quadprog · pwlf · scs · pyclothoids