https://github.com/pyunits/pyunit-math
数据分析和数学常用的方法
https://github.com/pyunits/pyunit-math
Last synced: 2 days ago
JSON representation
数据分析和数学常用的方法
- Host: GitHub
- URL: https://github.com/pyunits/pyunit-math
- Owner: pyunits
- Created: 2020-02-26T08:21:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-23T08:00:55.000Z (about 6 years ago)
- Last Synced: 2025-02-18T01:49:24.356Z (over 1 year ago)
- Language: Python
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **PyUnit-Math** [][1]
## 统计学和数学模块
[](https://pypi.org/project/pyunit-math/)
[]()
## 安装
pip install pyunit-math
## 使用
```python
from pyunit_math import ppi, cpi, binary_system, Distance, uuid6
def pi_test():
ppi(100_0000)
print(cpi(100_0000))
def bs_test():
print(binary_system('11011001000011010', 2, 36)) # 将2进制转为36进制
print(binary_system('2dqy', 36, 2)) # 将36进制转为2进制
def distance_test():
distance = Distance(x=[1, 2, 3], y=[2, 3, 4], w=None)
print(distance.cosine())
print(distance.hamming())
def uuid_test():
print(uuid6())
if __name__ == '__main__':
# import time
#
# start = time.time()
# pi_test()
# print(time.time() - start)
# bs_test()
# distance_test()
uuid_test()
```
***
[1]: https://blog.jtyoui.com