From 2043f3a9abe052a0407e49f6056fdc6e51b65f4a Mon Sep 17 00:00:00 2001 From: Peter Sharpe Date: Wed, 3 Jan 2024 00:37:12 +0100 Subject: [PATCH] add handling for no x values specified --- aerosandbox/numpy/integrate_discrete.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aerosandbox/numpy/integrate_discrete.py b/aerosandbox/numpy/integrate_discrete.py index 65271194..5ab87cfe 100644 --- a/aerosandbox/numpy/integrate_discrete.py +++ b/aerosandbox/numpy/integrate_discrete.py @@ -268,6 +268,9 @@ def integrate_discrete_squared_curvature( Performs this by constructing a cubic spline interpolant using Bernstein polynomials and exactly integrating the squared second derivative of that interpolant. """ + x_is_specified = (x is not None) + if not x_is_specified: + x = _onp.arange(length(f)) x1 = x[:-3] x2 = x[1:-2]