{"id":23417,"library":"changepy","title":"changepy","description":"Changepoint detection on time series in Python. Version 0.4.0 provides algorithms like PELT and binary segmentation for detecting shifts in mean and variance. Low release cadence; last release in 2020.","status":"active","version":"0.4.0","language":"python","source_language":"en","source_url":"https://github.com/ruipgil/changepy","tags":["changepoint","time-series","pelt","binary-segmentation"],"install":[{"cmd":"pip install changepy","lang":"bash","label":"Latest PyPI version"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"pelt","correct":"from changepy import pelt"},{"note":"","wrong":"","symbol":"binseg","correct":"from changepy import binseg"}],"quickstart":{"code":"import numpy as np\nfrom changepy import pelt\n\n# Generate example time series with one changepoint\nnp.random.seed(42)\nts = np.concatenate([np.random.normal(0, 1, 50),\n                     np.random.normal(5, 1, 50)])\n# Detect changepoints\nchangepoints = pelt(ts, penalty=2*np.log(len(ts)))\nprint(changepoints)  # Expected: [49] (0-indexed), typically","lang":"python","description":"Basic usage of PELT changepoint detection on a synthetic time series."},"warnings":[{"fix":"Convert your data to float: arr = np.array(data, dtype=float).","message":"The PELT implementation expects data to be an array-like of floats. Passing integer arrays may cause type errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Switch to ruptures (pip install ruptures) for more algorithms and active maintenance.","message":"No active development since 2020; consider using ruptures for maintained changepoint detection.","severity":"deprecated","affected_versions":">=0.4.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure changepy is installed: pip install --upgrade changepy","cause":"Outdated or incorrect installation; package may not be installed correctly.","error":"ImportError: cannot import name 'pelt' from 'changepy'"},{"fix":"Use one of the allowed string values: 'mean', 'var', or 'meanvar'.","cause":"Using an invalid model argument in pelt() or binseg().","error":"ValueError: The model must be one of 'mean', 'var', or 'meanvar'."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}