def create_calc_zscore_udf(result_formatter): return analytic(input_type=[dt.double], output_type=dt.double)(_format_udf_return_type( calc_zscore, result_formatter))
def create_demean_struct_udf(result_formatter): return analytic( input_type=[dt.double, dt.double], output_type=dt.Struct(['demean', 'demean_weight'], [dt.double, dt.double]), )(_format_struct_udf_return_type(demean_struct, result_formatter))