D = np.array([np.nan, 12, 0, 14, 18])fn_Mean(D, na_rm =True)
Completed the fn_Mean run!
{'AM': 11.0, 'GM': 0.0, 'HM': 0.0}
RuntimeWarning: divide by zero encountered in divide
26.6 Call 5: No error or warning
Code
E = np.array([np.nan, 12, 0, np.nan, 18])fn_Mean(E, na_rm =True)
Completed the fn_Mean run!
{'AM': 10.0, 'GM': 0.0, 'HM': 0.0}
26.7 Call 6: No error or warning
Code
G = np.array([np.nan, 12, 0, True, False])fn_Mean(G, na_rm =True)
Completed the fn_Mean run!
{'AM': 3.25, 'GM': 0.0, 'HM': 0.0}
26.8 Call 7: Error
Code
H = np.array([np.nan, 12, 0, 'A', 18])fn_Mean(H, na_rm =True)
An error has occurred! The error message is below.
ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
Completed the fn_Mean run!
26.9 Call 8: Error
Code
fn_Mean(J, na_rm =True)
NameError: name 'J' is not defined
26.10 Call 9: No warning or error
Code
G = np.array([np.nan, 12, 0, True, False])fn_Mean(G, na_rm =True)
Completed the fn_Mean run!
{'AM': 3.25, 'GM': 0.0, 'HM': 0.0}
26.11 Call 10: No error or warning
Code
G = np.array([np.nan, 12, 0, True, False])fn_Mean(G, na_rm ='True')