@disallow('<STR_LIT>', '<STR_LIT>')<EOL>def nancorr(a, b, method='<STR_LIT>', min_periods=None):
if len(a) != len(b):<EOL><INDENT>raise AssertionError('<STR_LIT>')<EOL><DEDENT>if min_periods is None:<EOL><INDENT>min_periods = <NUM_LIT:1><EOL><DEDENT>valid = notna(a) & notna(b)<EOL>if not valid.all():<EOL><INDENT>a = a[valid]<EOL>b = b[valid]<EOL><DEDENT>if len(a) < min_periods:<EOL><INDENT>return np.nan<EOL><DEDENT>f = get_corr_func(method)<EOL>return f(a, b)<EOL>
a, b: ndarrays