Skip to content

Commit

Permalink
Merge pull request #1596 from mathematicalmichael/patch-1
Browse files Browse the repository at this point in the history
address pandas deprecation warning
  • Loading branch information
CamDavidsonPilon authored Mar 7, 2024
2 parents 2bd0627 + 04ccad9 commit b8f0174
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lifelines/fitters/cox_time_varying_fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ def _compute_cumulative_baseline_hazard(self, tv_data, events, start, stop, weig
hazards = self.predict_partial_hazard(tv_data).values

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

for t in unique_death_times:
ix = (start.values < t) & (t <= stop.values)
Expand Down

0 comments on commit b8f0174

Please sign in to comment.