{"id":19862793,"url":"https://github.com/pyunits/pyunit-math","last_synced_at":"2026-06-07T18:32:53.115Z","repository":{"id":57458176,"uuid":"243207884","full_name":"pyunits/pyunit-math","owner":"pyunits","description":"数据分析和数学常用的方法","archived":false,"fork":false,"pushed_at":"2020-04-23T08:00:55.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-18T01:49:24.356Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/pyunits.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}},"created_at":"2020-02-26T08:21:09.000Z","updated_at":"2023-09-19T10:44:16.000Z","dependencies_parsed_at":"2022-09-09T23:02:08.036Z","dependency_job_id":null,"html_url":"https://github.com/pyunits/pyunit-math","commit_stats":null,"previous_names":["pyunit/pyunit-math"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyunits%2Fpyunit-math","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyunits%2Fpyunit-math/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyunits%2Fpyunit-math/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyunits%2Fpyunit-math/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyunits","download_url":"https://codeload.github.com/pyunits/pyunit-math/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241272617,"owners_count":19937091,"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-11-12T15:12:42.464Z","updated_at":"2026-06-07T18:32:53.053Z","avatar_url":"https://github.com/pyunits.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **PyUnit-Math** [![](https://gitee.com/tyoui/logo/raw/master/logo/photolog.png)][1]\n\n## 统计学和数学模块\n[![](https://img.shields.io/badge/Python-3.7-green.svg)](https://pypi.org/project/pyunit-math/)\n[![](https://img.shields.io/badge/统计学-Statistics-black.svg)]()\n\n## 安装\n    pip install pyunit-math\n    \n## 使用\n```python\nfrom pyunit_math import ppi, cpi, binary_system, Distance, uuid6\n\n\ndef pi_test():\n    ppi(100_0000)\n    print(cpi(100_0000))\n\n\ndef bs_test():\n    print(binary_system('11011001000011010', 2, 36))  # 将2进制转为36进制\n    print(binary_system('2dqy', 36, 2))  # 将36进制转为2进制\n\n\ndef distance_test():\n    distance = Distance(x=[1, 2, 3], y=[2, 3, 4], w=None)\n    print(distance.cosine())\n    print(distance.hamming())\n\n\ndef uuid_test():\n    print(uuid6())\n\n\nif __name__ == '__main__':\n    # import time\n    #\n    # start = time.time()\n    # pi_test()\n    # print(time.time() - start)\n    # bs_test()\n    # distance_test()\n    uuid_test()\n```\n\n***\n[1]: https://blog.jtyoui.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyunits%2Fpyunit-math","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyunits%2Fpyunit-math","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyunits%2Fpyunit-math/lists"}