Skip to content

Commit b8f0174

Browse files
Merge pull request #1596 from mathematicalmichael/patch-1
address pandas deprecation warning
2 parents 2bd0627 + 04ccad9 commit b8f0174

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lifelines/fitters/cox_time_varying_fitter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ def _compute_cumulative_baseline_hazard(self, tv_data, events, start, stop, weig
801801
hazards = self.predict_partial_hazard(tv_data).values
802802

803803
unique_death_times = np.unique(stop[events.values])
804-
baseline_hazard_ = pd.DataFrame(np.zeros_like(unique_death_times), index=unique_death_times, columns=["baseline hazard"])
804+
baseline_hazard_ = pd.DataFrame(np.zeros_like(unique_death_times).astype(float), index=unique_death_times, columns=["baseline hazard"])
805805

806806
for t in unique_death_times:
807807
ix = (start.values < t) & (t <= stop.values)

0 commit comments

Comments
 (0)