> Every page of the ganymede website is listed in https://eugo.io/docs/ganymede/llms.txt.

# Bottleneck

> Bottleneck: Collection of fast NumPy array functions written in C. A Python demo notebook from ganymede.

Web page: https://eugo.io/docs/ganymede/demo_notebooks/data_analytics/bottleneck/
Notebook: https://eugo.io/docs/ganymede/demo_notebooks/data_analytics/bottleneck/bottleneck.ipynb (source: https://github.com/eugo-inc/ganymede/blob/main/demo_notebooks/data_analytics/bottleneck.ipynb)

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

```python
import numpy as np
import bottleneck as bn
```

```python
a = np.array([1, 2, np.nan, 4, 5])
bn.nanmean(a)
bn.move_mean(a, window=2, min_count=1)
```

```python
bn.nansum([1, np.nan, np.inf])
bn.nansum([1, np.nan, -np.inf])
bn.nansum([1, np.nan, np.inf, -np.inf])
```

```python
bn.bench_detailed("move_median", fraction_nan=0.3)
```

```python
bn.bench()
```
