def _kurtosis(a):
    try:
        res = stats.kurtosis(a)
    except ValueError:
        res = np.nan
    return res
wrapper for scipy.stats.kurtosis that returns nan instead of raising Error
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/stats/descriptivestats.py/_kurtosis