Installation

Installation | Core concepts | Mechanisms | Patterns | Mathematical details | Benchmarking workflow | API reference

TSGap requires Python 3.11 or newer and NumPy 1.19 or newer. The project tests Python 3.11 through 3.14 in continuous integration and drops Python versions after they reach end of life.

From PyPI

pip install tsgap

From Source

git clone https://github.com/feruzoripov/tsgap.git
cd tsgap
pip install -e ".[dev]"

The development extra installs the test dependencies:

pytest tsgap/tests/ -v

Import Check

import numpy as np
from tsgap import simulate_missingness

X = np.random.default_rng(42).standard_normal((100, 4))
X_missing, mask = simulate_missingness(X, "mcar", 0.2, seed=42)

print(X_missing.shape)
print((~mask).mean())