{"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,"search_vec":"'0.4.0':10 '2020':31 'algorithm':12 'binari':16,38 'binary-segment':37 'cadenc':27 'changepi':1 'changepoint':2,32 'detect':3,19 'last':28 'like':13 'low':25 'mean':22 'pelt':14,36 'provid':11 'python':8 'releas':26,29 'segment':17,39 'seri':6,35 'shift':20 'time':5,34 'time-seri':33 'varianc':24 'version':9","created_at":"2026-05-01T08:07:40.444289+00:00","updated_at":"2026-05-01T08:07:40.444289+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.4.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ruipgil/changepy","docs":null,"changelog":null,"pypi":"https://pypi.org/project/changepy/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}