{"id":23092550,"url":"https://github.com/daochenzha/pydtw","last_synced_at":"2026-01-19T03:01:17.498Z","repository":{"id":133070512,"uuid":"394015760","full_name":"daochenzha/pydtw","owner":"daochenzha","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-25T21:07:26.000Z","size":4055,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T18:37:21.832Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daochenzha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-08T16:40:16.000Z","updated_at":"2024-11-13T01:14:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfe4ebd5-7841-4e54-90d1-2028e827f161","html_url":"https://github.com/daochenzha/pydtw","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daochenzha/pydtw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daochenzha%2Fpydtw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daochenzha%2Fpydtw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daochenzha%2Fpydtw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daochenzha%2Fpydtw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daochenzha","download_url":"https://codeload.github.com/daochenzha/pydtw/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daochenzha%2Fpydtw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28559347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T00:46:33.223Z","status":"online","status_checked_at":"2026-01-19T02:00:08.049Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T21:34:31.677Z","updated_at":"2026-01-19T03:01:17.471Z","avatar_url":"https://github.com/daochenzha.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"### pydtw\n`pydtw` is a simple python wrapper of `libdtw`, which is a fast, dynamic time warping library based on the [UCR Suite](http://www.cs.ucr.edu/~eamonn/UCRsuite.html). \n\nWorks for Python 3, but not for Windows, because I don't understand the Windows C compiler.\n\n\n### Install\n\n```bash\npip install -e .\n```\n\n### Usage\n\n```python\nimport numpy as np\nimport dtw\n\n\ndata = np.cumsum(np.random.uniform(-0.5, 0.5, 1000000))\nquery = np.cumsum(np.random.uniform(-0.5, 0.5, 100))\nresults = dtw.query(data, query, r=0.05)\n```\n\n* input\n  * `data`  : numpy.array of data\n  * `query` : numpy.array of the pattern to be matched\n  * `r`     : size of warping window\n* result : `dict`\n  * `results[\"index\"]` : the index of the first element in the best matching sequence in the data. \n  * `results[\"value\"]` : the DTW distance between the query and the matching sequence in the data.\n\n### Known Issues\n\n- The first element of the time-series is removed when translating from Python to C. I dont't know enough about Python -\u003e C to fix this and it doesn't really matter for my purposes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaochenzha%2Fpydtw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaochenzha%2Fpydtw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaochenzha%2Fpydtw/lists"}