{"id":15633935,"url":"https://github.com/vectorized/python-kd-tree","last_synced_at":"2025-05-05T04:03:58.448Z","repository":{"id":49831251,"uuid":"42746786","full_name":"Vectorized/Python-KD-Tree","owner":"Vectorized","description":"A simple and fast KD-tree for points in Python for kNN or nearest points. (damm short at just ~60 lines) No libraries needed.","archived":false,"fork":false,"pushed_at":"2024-04-14T18:57:11.000Z","size":19,"stargazers_count":175,"open_issues_count":5,"forks_count":35,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-05T04:03:54.068Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"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/Vectorized.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":"2015-09-18T20:59:07.000Z","updated_at":"2025-03-24T12:30:55.000Z","dependencies_parsed_at":"2024-10-22T16:16:39.190Z","dependency_job_id":null,"html_url":"https://github.com/Vectorized/Python-KD-Tree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorized%2FPython-KD-Tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorized%2FPython-KD-Tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorized%2FPython-KD-Tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectorized%2FPython-KD-Tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vectorized","download_url":"https://codeload.github.com/Vectorized/Python-KD-Tree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252436291,"owners_count":21747470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-10-03T10:50:40.847Z","updated_at":"2025-05-05T04:03:58.428Z","avatar_url":"https://github.com/Vectorized.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Python KD-Tree for Points\n=========================\n\nA simple and decently performant KD-Tree in Python.\n\nJust about 60 lines of code excluding comments.\n\nIt's so simple that you can just copy and paste, or translate to other languages!   \nYour teacher will assume that you are a good student who coded it from scratch.\n\nWhy?\n----\n\nNo external dependencies like numpy, scipy, etc.\n\nSupports points that are array-like: lists, arrays, numpy arrays.\n\nJust star this project if you find it helpful... so others can know it's better than those long winded kd-tree codes. ;)\n\nRequirements\n------------\n\nPython 2.x or 3.x\n\nDependencies\n------------\n\nNone\n\nNotes\n-----\n\nCreation of the KD-Tree isn't strictly O(n log (n)), but is similar O(n log (n)) in practice.   \nIt abuses Python's native sort (TimSort) which is O(n) for nearly sorted lists.   \n\nAdding too many points relative to the number of points in the tree can degrade performance.   \nIf you are adding many new points into the tree, it is better to re-create the tree.\n\nLicense\n-------\n\nCC0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorized%2Fpython-kd-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvectorized%2Fpython-kd-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorized%2Fpython-kd-tree/lists"}