Skip to content

Commit

Permalink
Merge pull request #10 from biolab/kaplan-meier/km_fitter
Browse files Browse the repository at this point in the history
[FIX] owkaplanmeier: cast to a float before fitting the Kaplan-Meier curve.
  • Loading branch information
JakaKokosar authored Jan 12, 2021
2 parents 62e2ae9 + 6d20119 commit 9aea4f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orangecontrib/survival_analysis/widgets/owkaplanmeier.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def generate_curve_coordinates(timeline, probabilities):
return np.array(x), np.array(y)

def __init__(self, time, events, label=None, color=None):
self._kmf = KaplanMeierFitter().fit(time, events)
self._kmf = KaplanMeierFitter().fit(time.astype(np.float64), events.astype(np.float64))

self.label: str = label
self.color: List[int] = color
Expand Down

0 comments on commit 9aea4f0

Please sign in to comment.