Skip to content

Commit

Permalink
add handling for no x values specified
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdsharpe committed Jan 2, 2024
1 parent ba2e234 commit 2043f3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aerosandbox/numpy/integrate_discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 2043f3a

Please sign in to comment.