UNQ_C1 proportion_treated : Data-type mismatch

Hi, I wanted to report that there is still the Data type mismatch problem, and that the only way to pass the test is to write

return np.float64(proportion)

Same happen in UNQ_C2.
I hope it can be useful

Hi @Alberto_Zacchini,

Thanks.

The return type is mentioned in the doc string of UNQ_C1

“”"
Compute proportion of trial participants who have been treated

Args:
    df (dataframe): dataframe containing trial results. Column
                  'TRTMT' is 1 if patient was treated, 0 otherwise.

Returns:
    result (float64): proportion of patients who were treated
""" 

Best,
Mubsi

1 Like

In def event_rate(df), the return values are supposed to be float:

Returns:
treated_prob (float): empirical probability of death given treatment
untreated_prob (float): empirical probability of death given control

But event_rate_test still expects float64.

Hi @alankarmisra,

You are right.

I have this fixed soon.

EDIT: It has been fixed.

Thank you both for pointing it out.

Best,
Mubsi

1 Like