Bottleneck
Description:
- Collection of fast NumPy array functions written in C.
Resources:
- https://github.com/pydata/bottleneck
- https://bottleneck.readthedocs.io/en/latest/
- https://bottleneck.readthedocs.io/en/latest/reference.html
import numpy as npimport bottleneck as bna = np.array([1, 2, np.nan, 4, 5])bn.nanmean(a)bn.move_mean(a, window=2, min_count=1)bn.nansum([1, np.nan, np.inf])bn.nansum([1, np.nan, -np.inf])bn.nansum([1, np.nan, np.inf, -np.inf])bn.bench_detailed("move_median", fraction_nan=0.3)bn.bench()ganymede is made by Eugo