# pydata/bottleneck

Fast NumPy array functions written in C

Repository: https://github.com/pydata/bottleneck
Canonical: https://ross.abutalabs.com/products/pydata-bottleneck
Language: Python
License: BSD-2-Clause
License Family: permissive
Topics: c, python, numpy, fast, c-extension
Last push: 2026-08-09T08:45:26+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 8, longevity 100
- inputs: {"age_days": 5758, "days_push": 24, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1181, forks 114 (observed 2026-08-28T04:03:54.059799+00:00)

## What it is
Bottleneck is a collection of fast NumPy array functions implemented as C extensions, covering NaN-aware reductions like nanmean and fast moving-window statistics. It is a drop-in performance accelerator for common NumPy operations.

## Use cases
- speed up nanmean, nanstd and other NaN-aware NumPy reductions
- compute moving window mean, sum, std on large arrays quickly
- replace slow NumPy calls in a pandas or scientific pipeline
- benchmark NumPy vs Bottleneck performance
- fill forward values with push on time series arrays

## When to choose
- you need faster NaN-aware reductions or moving-window statistics than NumPy provides
- your workload spends significant time in these specific array operations
- you want a lightweight C extension with no heavy dependencies beyond NumPy

## When to avoid
- you need operations Bottleneck does not implement
- your arrays are small and NumPy overhead is negligible
- you need GPU acceleration or distributed arrays

## Facets
- artifact type: library
- maturity: active
- function: math, benchmarking
- domain: data-science, performance
- platform: python, cross-platform
- tags: numpy, c-extension, moving-window, nan-handling, array-functions, algorithms

## Member repositories
- pydata/bottleneck (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:54.059799+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:25:12.872368+00:00, confidence not recorded.
  - readme: https://github.com/pydata/bottleneck (fetched 2026-08-28T04:03:54.059799+00:00, sha 0ad59d859023)
- Data as of 2026-08-30T08:39:29.467469+00:00.
