Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
hampel
✓ from hampel import hampel
Correct import for the main filter function
Simple outlier detection on a numpy array.
import numpy as np
from hampel import hampel
data = np.array([1, 2, 1, 2, 10, 2, 1, 2, 1])
result = hampel(data, window_size=3, n_sigma=3.0)
print(result.filtered_data)
print(result.outliers)
Errors
Common errors & fixes
TypeError: 'tuple' object is not callable
Trying to call the result of hampel as a function, e.g., result()
fixAccess attributes directly: result.filtered_data or result.outliers.
ValueError: window_size must be >= 2
window_size too small, minimum is 2
fixSet window_size to at least 2 (recommended 3 or more).
Upgrade
Version history
1.0.2latest on PyPI · released Sep 19, 2023
Audit
Dependencies
numpyrequiredCore dependency for array operations
pandasoptionalOptional for DataFrame input