Skip to content

Commit

Permalink
Merge pull request #153 from arvkevi/issue-149-remove-warning
Browse files Browse the repository at this point in the history
No longer warns when no knee/elbow is found
  • Loading branch information
arvkevi committed Jul 9, 2023
2 parents ba217b7 + 5457d54 commit 2f66708
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions kneed/knee_locator.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ class KneeLocator(object):
:vartype y_difference_minima: numpy array
:ivar Tmx: The y values that correspond to the thresholds on the difference curve for determining the knee point.
:vartype Tmx: numpy array
:ivar knee: The x value of the knee point.
:ivar knee: The x value of the knee point. None if no knee/elbow was detected.
:vartype knee: float
:ivar knee_y: The y value of the knee point.
:ivar knee_y: The y value of the knee point. None if no knee/elbow was detected
:vartype knee_y: float
:ivar norm_knee: The normalized x value of the knee point.
:ivar norm_knee: The normalized x value of the knee point. None if no knee/elbow was detected
:vartype norm_knee: float
:ivar norm_knee_y: The normalized y value of the knee point.
:ivar norm_knee_y: The normalized y value of the knee point. None if no knee/elbow was detected
:vartype norm_knee_y: float
:ivar all_knees: The x values of all the identified knee points.
:vartype all_knees: set
Expand All @@ -111,13 +111,13 @@ class KneeLocator(object):
:vartype all_norm_knees: set
:ivar all_norm_knees_y: The normalized y values of all the identified knee points.
:vartype all_norm_knees: set
:ivar elbow: The x value of the elbow point (elbow and knee are interchangeable).
:ivar elbow: The x value of the elbow point (elbow and knee are interchangeable). None if no knee/elbow was detected
:vartype elbow: float
:ivar elbow_y: The y value of the knee point (elbow and knee are interchangeable).
:ivar elbow_y: The y value of the knee point (elbow and knee are interchangeable). None if no knee/elbow was detected
:vartype elbow_y: float
:ivar norm_elbow: The normalized x value of the knee point (elbow and knee are interchangeable).
:ivar norm_elbow: The normalized x value of the knee point (elbow and knee are interchangeable). None if no knee/elbow was detected
:vartype norm_knee: float
:ivar norm_elbow_y: The normalized y value of the knee point (elbow and knee are interchangeable).
:ivar norm_elbow_y: The normalized y value of the knee point (elbow and knee are interchangeable). None if no knee/elbow was detected
:vartype norm_elbow_y: float
:ivar all_elbows: The x values of all the identified knee points (elbow and knee are interchangeable).
:vartype all_elbows: set
Expand Down Expand Up @@ -311,7 +311,7 @@ def find_knee(
return knee, norm_knee

if self.all_knees == set():
warnings.warn("No knee/elbow found")
# No knee was found
return None, None

return knee, norm_knee
Expand Down

0 comments on commit 2f66708

Please sign in to comment.