Skip to content

Commit

Permalink
fix code that was out of place
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-simpson committed Mar 18, 2021
1 parent 3298a2f commit c0a9956
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gempy/library/astromodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,11 @@ def __new__(cls, x, y, order=None, s=None, w=None, bbox=[None]*2, k=3,
if i not in indices:
xgood[i] *= (1.0 + epsf)

# Ensure the spline is constrained: num_points - k is max order
this_order = min(this_order, xgood.size - k)

# Space knots equally based on density of unique x values
if order is not None:
# Ensure the spline is constrained: num_points - k is max order
this_order = min(this_order, xgood.size - k)

knots = [xunique[int(xx+0.5)]
for xx in np.linspace(0, xunique.size-1, this_order+1)[1:-1]]
spline_args = (knots,)
Expand Down

0 comments on commit c0a9956

Please sign in to comment.