Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
See Also:
* climpred.effective_sample_size
* climpred.spearman_r_eff_p_value
Reference:
* Bretherton, Christopher S., et al. "The effective number of spatial degrees of
freedom of a time-varying field." Journal of climate 12.7 (1999): 1990-2009.
"""
skipna = metric_kwargs.get('skipna', False)
# p value returns a runtime error when working with NaNs, such as on a climate
# model grid. We can avoid this annoying output by specifically suppressing
# warning here.
with warnings.catch_warnings():
warnings.simplefilter('ignore')
return pearson_r_eff_p_value(forecast, verif, dim=dim, skipna=skipna,)