'Returns a function that calculates the baseline cumulative
hazard function for each stratum.
Parameters
params : ndarray
The model parameters.
Returns
A dict mapping stratum names to the estimated baseline
cumulative hazard function.'

def baseline_cumulative_hazard_function(self, params):

    from scipy.interpolate import interp1d
    surv = self.surv
    base = self.baseline_cumulative_hazard(params)
    cumhaz_f = {}
    for stx in range(surv.nstrat):
        time_h = base[stx][0]
        cumhaz = base[stx][1]
        time_h = np.r_[((- np.inf), time_h, np.inf)]
        cumhaz = np.r_[(cumhaz[0], cumhaz, cumhaz[(-1)])]
        func = interp1d(time_h, cumhaz, kind='zero')
        cumhaz_f[self.surv.stratum_names[stx]] = func
    return cumhaz_f
