parameters: (a, b, method='pearson', min_periods=None)
return_statement: return f(a, b)
docstring: a, b: ndarrays
docstring_summary: a, b: ndarrays
docstring_tokens: a b : ndarrays
function: def nancorr(a, b, method='pearson', min_periods=None):
      """
      a, b: ndarrays
      """
      if len(a) != len(b):
          raise AssertionError('Operands to nancorr must have same size')
  
      if min_periods is None:
          min_periods = 1
  
      valid = notna(a) & notna(b)
      if not valid.all():
          a = a[valid]
          b = b[valid]
  
      if len(a) < min_periods:
          return np.nan
  
      f = get_corr_func(method)
      return f(a, b)
function_tokens: def nancorr ( a , b , method = 'pearson' , min_periods = None ) : if len ( a ) != len ( b ) : raise AssertionError ( 'Operands to nancorr must have same size' ) if min_periods is None : min_periods = 1 valid = notna ( a ) & notna ( b ) if not valid . all ( ) : a = a [ valid ] b = b [ valid ] if len ( a ) < min_periods : return np . nan f = get_corr_func ( method ) return f ( a , b )