Skip to content

Commit

Permalink
implementing comments by Sarah Huelsen
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinGebhart committed Aug 22, 2024
1 parent 9939d63 commit 0274acd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions climada/util/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
---
define fit functionalities for (local) exceedance frequencies and return periods
Define interpolation and extrapolation functions for calculating (local) exceedance frequencies and return periods

Check warning on line 19 in climada/util/interpolation.py

View check run for this annotation

Jenkins - WCR / Pylint

line-too-long

LOW: Line too long (114/100)
Raw output
Used when a line is longer than a given number of characters.
"""


Expand Down Expand Up @@ -53,9 +53,9 @@ def interpolate_ev(
y_train : array_like
1-D array of y-values of training data
logx : bool, optional
If set to True, x_values are convert to log scale. Defaults to False.
If set to True, x_values are converted to log scale. Defaults to False.
logy : bool, optional
If set to True, x_values are convert to log scale. Defaults to False.
If set to True, y_values are converted to log scale. Defaults to False.
x_threshold : float, optional
Lower threshold to filter x_train. Defaults to None.
y_threshold : float, optional
Expand Down Expand Up @@ -146,7 +146,7 @@ def stepfunction_ev(
if x_train.size < 2:
return _interpolate_small_input(x_test, x_train, y_train, None, y_asymptotic)

# find indeces of x_test if sorted into x_train
# find indices of x_test if sorted into x_train
if not all(sorted(x_train) == x_train):
raise ValueError('Input array x_train must be sorted in ascending order.')

Check warning on line 151 in climada/util/interpolation.py

View check run for this annotation

Jenkins - WCR / Code Coverage

Not covered line

Line 151 is not covered by tests
indx = np.searchsorted(x_train, x_test)
Expand Down

0 comments on commit 0274acd

Please sign in to comment.