Skip to content

v0.9.0

Latest

Choose a tag to compare

@arvkevi arvkevi released this 19 Oct 01:28
2056930

Highlights

  • Correct knees on unevenly spaced x for concave decreasing and convex increasing curves (#98, #176). The curve was mirrored by index instead of by value, which skewed the knee whenever x wasn't evenly spaced. Thanks to @vhu43 for the approach in #142.
  • Python 3.10+. Python 3.8 and 3.9 are no longer supported, and CI now covers 3.10 through 3.15 (#175). pip on 3.8 or 3.9 keeps installing 0.8.6.
  • all_knees and all_norm_knees are now lists in the order the knees were found, so all_knees[i] pairs with all_knees_y[i] (#161).

Fixes

  • knee_y and norm_knee_y were None when the knee was at x=0 (#171)
  • A wrong knee when x is an int8, int16 or int32 array whose range overflows the type (#173)
  • interp_method="interp1d" uses y directly. It used to call scipy.interpolate.interp1d at the same x values, which returned y unchanged, so results are identical (#178).

Upgrading

  • If you relied on all_knees being a set (kl.all_knees == {3}, set operations), use set(kl.all_knees). Iterating, len, in and sorted() work as before.
  • Knees on unevenly spaced x can move for concave decreasing and convex increasing curves; the old values were wrong. Evenly spaced x gives the same knees as before.
  • x and y of different lengths now raise ValueError: x and y must be the same length. for both interp_methods.