Skip to content

Commit

Permalink
Raise error from original error
Browse files Browse the repository at this point in the history
  • Loading branch information
APJansen committed Jul 12, 2023
1 parent 9b6a675 commit 8566728
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions n3fit/src/n3fit/scaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ def generate_scaler(

try:
scaler = PchipInterpolator(map_from, map_to)
except ValueError:
raise ValueError("interpolation_points is larger than the number of unique input x-values")
except ValueError as e:
raise ValueError(
"interpolation_points is larger than the number of unique input x-values"
) from e

def _scaler(x):
x_scaled = scaler(np.log(x))
Expand Down

0 comments on commit 8566728

Please sign in to comment.