How to use the numbagg.move_exp_nanmean function in numbagg

To help you get started, we’ve selected a few numbagg examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pydata / xarray / xarray / core / rolling_exp.py View on Github external
def move_exp_nanmean(array, *, axis, alpha):
    if isinstance(array, dask_array_type):
        raise TypeError("rolling_exp is not currently support for dask arrays")
    import numbagg

    if axis == ():
        return array.astype(np.float64)
    else:
        return numbagg.move_exp_nanmean(array, axis=axis, alpha=alpha)