From 6d201192831d6362c3e8854bc6deae0c219d54ac Mon Sep 17 00:00:00 2001 From: jakakokosar Date: Tue, 12 Jan 2021 09:28:51 +0100 Subject: [PATCH] owkaplanmeier: cast to a float before fitting the Kaplan-Meier curve. --- orangecontrib/survival_analysis/widgets/owkaplanmeier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orangecontrib/survival_analysis/widgets/owkaplanmeier.py b/orangecontrib/survival_analysis/widgets/owkaplanmeier.py index e485277..ba40b0b 100644 --- a/orangecontrib/survival_analysis/widgets/owkaplanmeier.py +++ b/orangecontrib/survival_analysis/widgets/owkaplanmeier.py @@ -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