PyPyNum 1.8.2__tar.gz → 1.9.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/PKG-INFO +579 -542
  2. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/PyPyNum.egg-info/PKG-INFO +579 -542
  3. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/PyPyNum.egg-info/SOURCES.txt +1 -0
  4. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/Array.py +45 -8
  5. PyPyNum-1.9.1/pypynum/README.md +839 -0
  6. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/Symbolics.py +11 -13
  7. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/__init__.py +2 -2
  8. PyPyNum-1.9.1/pypynum/cipher.py +270 -0
  9. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/constants.py +26 -2
  10. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/errors.py +4 -0
  11. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/maths.py +49 -38
  12. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/plotting.py +10 -27
  13. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/probability.py +38 -0
  14. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/regression.py +2 -4
  15. PyPyNum-1.9.1/pypynum/test.py +341 -0
  16. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/this.py +1 -1
  17. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/tools.py +5 -5
  18. PyPyNum-1.9.1/pypynum/ufuncs.py +26 -0
  19. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/utils.py +154 -11
  20. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/setup.py +1 -1
  21. PyPyNum-1.8.2/pypynum/README.md +0 -802
  22. PyPyNum-1.8.2/pypynum/cipher.py +0 -23
  23. PyPyNum-1.8.2/pypynum/test.py +0 -294
  24. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/PyPyNum.egg-info/dependency_links.txt +0 -0
  25. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/PyPyNum.egg-info/top_level.txt +0 -0
  26. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/FourierT.py +0 -0
  27. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/Geometry.py +0 -0
  28. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/Graph.py +0 -0
  29. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/Group.py +0 -0
  30. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/Logic.py +0 -0
  31. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/Matrix.py +0 -0
  32. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/NeuralN.py +0 -0
  33. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/PyPyNum.png +0 -0
  34. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/Quaternion.py +0 -0
  35. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/Tensor.py +0 -0
  36. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/Tree.py +0 -0
  37. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/Vector.py +0 -0
  38. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/chars.py +0 -0
  39. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/equations.py +0 -0
  40. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/file.py +0 -0
  41. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/numbers.py +0 -0
  42. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/polynomial.py +0 -0
  43. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/random.py +0 -0
  44. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/sequence.py +0 -0
  45. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/pypynum/types.py +0 -0
  46. {PyPyNum-1.8.2 → PyPyNum-1.9.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyPyNum
3
- Version: 1.8.2
3
+ Version: 1.9.1
4
4
  Summary: A multifunctional mathematical calculation package written in pure Python programming language [Python>=3.4]
5
5
  Home-page: https://github.com/PythonSJL/PyPyNum
6
6
  Author: Shen Jiayi
@@ -692,13 +692,13 @@ Description-Content-Type: text/markdown
692
692
  [![Downloads](https://static.pepy.tech/badge/pypynum/month)](https://pepy.tech/project/pypynum)
693
693
  [![Downloads](https://static.pepy.tech/badge/pypynum/week)](https://pepy.tech/project/pypynum)
694
694
 
695
- ## Version -> 1.8.2 | PyPI -> https://pypi.org/project/PyPyNum/ | Gitee -> https://www.gitee.com/PythonSJL/PyPyNum | GitHub -> https://github.com/PythonSJL/PyPyNum
695
+ ## Version -> 1.9.1 | PyPI -> https://pypi.org/project/PyPyNum/ | Gitee -> https://www.gitee.com/PythonSJL/PyPyNum | GitHub -> https://github.com/PythonSJL/PyPyNum
696
696
 
697
697
  ![LOGO](PyPyNum.png)
698
698
 
699
- PyPI上无法显示logo,可以在Gitee中查看。
699
+ PyPI上无法显示logo,可以在Gitee或者GitHub中查看。
700
700
 
701
- The logo cannot be displayed on PyPI, it can be viewed in Gitee.
701
+ The logo cannot be displayed on PyPI, it can be viewed in Gitee or GitHub.
702
702
 
703
703
  ### 介绍
704
704
 
@@ -709,8 +709,47 @@ The logo cannot be displayed on PyPI, it can be viewed in Gitee.
709
709
  supports other types of Python interpreters
710
710
  + 不定期更新版本,增加更多实用功能
711
711
  + Update versions periodically to add more practical features
712
- + 如需联系,QQ 2261748025 (Py𝙿𝚢𝚝𝚑𝚘𝚗-水晶兰)
713
- + If you need to contact, QQ 2261748025 (Py𝙿𝚢𝚝𝚑𝚘𝚗-水晶兰)
712
+ + 如需联系,请添加QQ2261748025 (Py𝙿𝚢𝚝𝚑𝚘𝚗-水晶兰)
713
+ + If you need to contact, please add QQ number 2261748025 (Py𝙿𝚢𝚝𝚑𝚘𝚗-水晶兰)
714
+
715
+ ### 子模块的名称与功能简介
716
+
717
+ #### Name and Function Introduction of Submodules
718
+
719
+ | 子模块名称 Submodule Name | 功能简介 Function Introduction |
720
+ |-----------------------|--------------------------------------------|
721
+ | `pypynum.Array` | 多维数组 Multidimensional array |
722
+ | `pypynum.chars` | 特殊数学符号 Special mathematical symbols |
723
+ | `pypynum.cipher` | 加密解密算法 Encryption and decryption algorithm |
724
+ | `pypynum.constants` | 数学常数集合 Set of mathematical constants |
725
+ | `pypynum.equations` | 方程求解 Solving equations |
726
+ | `pypynum.errors` | 异常对象 Exception object |
727
+ | `pypynum.file` | 文件读写 File read and write |
728
+ | `pypynum.FourierT` | 傅里叶变换 Fourier transform |
729
+ | `pypynum.Geometry` | 几何形状 Geometric shape |
730
+ | `pypynum.Graph` | 图论算法 Graph Theory Algorithm |
731
+ | `pypynum.Group` | 群论算法 Group Theory Algorithm |
732
+ | `pypynum.Logic` | 逻辑电路设计 Logic circuit design |
733
+ | `pypynum.maths` | 通用数学函数 General mathematical functions |
734
+ | `pypynum.Matrix` | 矩阵运算 Matrix operation |
735
+ | `pypynum.NeuralN` | 神经网络训练 Neural network training |
736
+ | `pypynum.numbers` | 数字处理 Number processing |
737
+ | `pypynum.plotting` | 数据可视化 Data visualization |
738
+ | `pypynum.polynomial` | 多项式运算 Polynomial operation |
739
+ | `pypynum.probability` | 概率统计 Probability statistics |
740
+ | `pypynum.Quaternion` | 四元数运算 Quaternion operation |
741
+ | `pypynum.random` | 随机数生成 Random number generation |
742
+ | `pypynum.regression` | 回归分析 Regression analysis |
743
+ | `pypynum.sequence` | 数列计算 Sequence calculation |
744
+ | `pypynum.Symbolics` | 符号计算 Symbol calculation |
745
+ | `pypynum.Tensor` | 张量运算 Tensor operation |
746
+ | `pypynum.test` | 简易测试 Easy test |
747
+ | `pypynum.this` | 项目之禅 Zen of Projects |
748
+ | `pypynum.tools` | 辅助函数 Auxiliary functions |
749
+ | `pypynum.Tree` | 树形数据结构 Tree data structure |
750
+ | `pypynum.types` | 特殊类型 Special types |
751
+ | `pypynum.utils` | 实用工具 Utility |
752
+ | `pypynum.Vector` | 向量运算 Vector operation |
714
753
 
715
754
  ### PyPyNum的Zen(预览)
716
755
 
@@ -727,11 +766,19 @@ Straightforwardness is preferred over convolution.
727
766
  Sophisticated is better than overcomplicated.
728
767
  Flat structure beats nested hierarchies.
729
768
  Sparse code wins over bloated ones.
769
+ ```
770
+
771
+ ```
772
+ ...
773
+
774
+ Do you want to view all the content?
730
775
 
731
- ... (Do you want to view all the content?
732
776
  Enter "from pypynum import this" in your
733
- Python interpreter and run it!)
734
777
 
778
+ Python interpreter and run it!
779
+ ```
780
+
781
+ ```
735
782
  February 27, 2024
736
783
  ```
737
784
 
@@ -742,47 +789,9 @@ Python interpreter and run it!)
742
789
  ```
743
790
  !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
744
791
 
745
- 已确认此库能够向下兼容Python 3.4版本
746
- 以此支持IronPython解释器。
747
-
748
- It has been confirmed that this
749
- library is backward compatible
750
- with Python version 3.4 to
751
- support the IronPython
752
- interpreter.
753
-
754
- !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
755
-
756
- 修改并优化了部分功能。
757
-
758
- Modified and optimized some
759
- features.
760
-
761
- !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
762
-
763
- 修改了fill函数,该函数将一维值序列填充
764
- 到指定形状的数组中。如果未指定列表,则默
765
- 认为从零开始递增的序列。此函数默认为循环
766
- 填充,否则使用零填充来填充剩余位置。
767
-
768
- Modified the fill function,
769
- which fills a one-dimensional
770
- value sequence into an array of
771
- specified shapes. If no list is
772
- specified, it defaults to a
773
- sequence that increments from
774
- zero. This function defaults to
775
- loop padding, otherwise zero
776
- padding is used to fill the
777
- remaining positions.
778
-
779
- !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
792
+ 修复了一些功能问题
780
793
 
781
- 使用辛普森公式提高定积分的计算精度。
782
-
783
- Use Simpson's formula to improve
784
- the calculation accuracy of
785
- definite integrals.
794
+ Fixed some functional issues
786
795
 
787
796
  !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
788
797
  ```
@@ -809,374 +818,357 @@ definite integrals.
809
818
 
810
819
  ```
811
820
  PyPyNum
812
- __init__
813
- [Import some features from other modules in this package]
814
- errors [Special errors]
815
- CLASSES
816
- LogicError
817
- RandomError
818
- ShapeError
819
- file [Reading and saving instance data]
820
- FUNCTIONS
821
- read(file: str) -> list
822
- write(file: str, *cls: object)
823
- test
824
- [A code test file]
825
- this
826
- [The Zen of PyPyNum]
827
- types [Special types]
828
- DATA
829
- arr = typing.Union[list, tuple]
830
- ite = typing.Union[list, tuple, str]
831
- num = typing.Union[int, float, complex]
832
- real = typing.Union[int, float]
833
- Array [N-dimensional array]
834
- CLASSES
835
- Array
836
- FUNCTIONS
837
- array(data=None)
838
- fill(shape, sequence=None, repeat=True)
839
- function(_array, _function, args=None)
840
- get_shape(data)
841
- is_valid_array(_array, _shape)
842
- zeros(shape)
843
- zeros_like(_nested_list)
844
- FourierT [Fourier transform and inverse Fourier transform]
845
- CLASSES
846
- FT1D
847
- Geometry [Planar geometry]
848
- CLASSES
849
- Circle
850
- Line
851
- Point
852
- Polygon
853
- Quadrilateral
854
- Triangle
855
- FUNCTIONS
856
- distance(g1, g2, error: int | float = 0) -> float
857
- Graph [Graph theory]
858
- CLASSES
859
- BaseGraph
860
- BaseWeGraph
861
- WeDiGraph
862
- WeUnGraph
863
- DiGraph
864
- UnGraph
865
- Group [Group theory]
866
- CLASSES
867
- Group
868
- FUNCTIONS
869
- add(x, y)
870
- divide(x, y)
871
- group(data)
872
- multiply(x, y)
873
- subtract(x, y)
874
- Logic [Logic circuit simulation]
875
- CLASSES
876
- Basic
877
- Binary
878
- AND
879
- COMP
880
- HalfAdder
881
- HalfSuber
882
- JKFF
883
- NAND
884
- NOR
885
- OR
886
- XNOR
887
- XOR
888
- Quaternary
889
- TwoBDiver
890
- TwoBMuler
891
- Ternary
892
- FullAdder
893
- FullSuber
894
- Unary
895
- DFF
896
- NOT
897
- TFF
898
- Matrix [Matrix calculation]
899
- CLASSES
900
- Matrix
901
- FUNCTIONS
902
- eigen(matrix: pypynum.Matrix.Matrix) -> tuple
903
- hessenberg(matrix: pypynum.Matrix.Matrix) -> tuple
904
- identity(n: int) -> pypynum.Matrix.Matrix
905
- lu(matrix: pypynum.Matrix.Matrix) -> tuple
906
- mat(data)
907
- qr(matrix: pypynum.Matrix.Matrix) -> tuple
908
- rotate90(matrix: pypynum.Matrix.Matrix, times: int) -> pypynum.Matrix.Matrix
909
- same(rows, cols, value=0)
910
- svd(matrix: pypynum.Matrix.Matrix) -> tuple
911
- tril_indices(n: int, k: int = 0, m: int = None) -> tuple
912
- zeros(_dimensions)
913
- zeros_like(_nested_list)
914
- NeuralN [A simple neural network model]
915
- CLASSES
916
- NeuralNetwork
917
- FUNCTIONS
918
- neuraln(_input, _hidden, _output)
919
- Quaternion [Quaternion calculation]
920
- CLASSES
921
- Euler
922
- Quaternion
923
- FUNCTIONS
924
- change(data: Union[pypynum.Quaternion.Quaternion, pypynum.Matrix.Matrix, pypynum.Quaternion.Euler], to: str) -> Union[pypynum.Quaternion.Quaternion, pypynum.Matrix.Matrix, pypynum.Quaternion.Euler]
925
- euler(yaw: Union[int, float] = 0, pitch: Union[int, float] = 0, roll: Union[int, float] = 0) -> pypynum.Quaternion.Euler
926
- quat(w: Union[int, float] = 0, x: Union[int, float] = 0, y: Union[int, float] = 0, z: Union[int, float] = 0) -> pypynum.Quaternion.Quaternion
927
- Symbolics [Symbol calculation]
928
- FUNCTIONS
929
- interpreter(expr: str) -> list
930
- DATA
931
- basic = "%()*+-./0123456789"
932
- english = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
933
- greek = "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψω"
934
- operators = ["**", "*", "//", "/", "%", "+", "-"]
935
- valid = "%()*+-./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcd...zΑΒΓΔΕΖΗΘΙ...
936
- Tensor [Tensor calculation]
937
- CLASSES
938
- Tensor
939
- FUNCTIONS
940
- ten(data)
941
- tensor_and_number(tensor, operator, number)
942
- tolist(_nested_list)
943
- zeros(_dimensions)
944
- zeros_like(_nested_list)
945
- Tree [Various trees]
946
- CLASSES
947
- MultiTree
948
- MultiTreeNode
949
- Vector [Vector calculation]
950
- CLASSES
951
- Vector
952
- FUNCTIONS
953
- same(length, value=0)
954
- vec(data)
955
- zeros(_dimensions)
956
- zeros_like(_nested_list)
957
- chars [Special mathematical symbols]
958
- DATA
959
- arrow = [["↖", "↑", "↗"], ["←", "⇌", "→"], ["↙", "↓", "↘"], ["↔", "⇋",...
960
- div = "÷"
961
- mul = "×"
962
- others = "¬°‰‱′″∀∂∃∅∆∇∈∉∏∐∑∝∞∟∠∣∥∧∨∩∪∫∬∭∮∯∰∴∵∷∽≈≌≒≠≡≢≤≥≪≫≮≯≰≱≲≳⊕⊙⊥⊿⌒㏑㏒...
963
- overline = "̄"
964
- pi = "Ππ𝜫𝝅𝝥𝝿𝞟𝞹Пп∏ϖ∐ℼㄇ兀"
965
- sgn = "±"
966
- strikethrough = "̶"
967
- subscript = "₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓ"
968
- superscript = "⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴿᵀᵁⱽᵂᵃᵇᶜᵈᵉᶠᵍʰⁱʲᵏˡᵐⁿᵒᵖʳˢᵗᵘᵛ...
969
- tab = [["┌", "┬", "┐"], ["├", "┼", "┤"], ["└", "┴", "┘"], ["─", "╭", "...
970
- underline = "_"
971
- cipher [String encryption and decryption algorithms]
972
- FUNCTIONS
973
- dna(string: str, decrypt: bool = False) -> str
974
- constants [Constants in mathematics and science]
975
- DATA
976
- AMU = 1.6605402e-27
977
- EB = 1152921504606846976
978
- G = 6.6743e-11
979
- GB = 1073741824
980
- KB = 1024
981
- MB = 1048576
982
- NA = 6.02214076e+23
983
- PB = 1125899906842624
984
- TB = 1099511627776
985
- YB = 1208925819614629174706176
986
- ZB = 1180591620717411303424
987
- atto = 1e-18
988
- c = 299792458
989
- centi = 0.01
990
- deci = 0.1
991
- deka = 10
992
- e = 2.718281828459045
993
- exa = 1000000000000000000
994
- femto = 1e-15
995
- gamma = 0.5772156649015329
996
- giga = 1000000000
997
- h = 6.62607015e-34
998
- hecto = 100
999
- inf = inf
1000
- kilo = 1000
1001
- mega = 1000000
1002
- micro = 1e-06
1003
- milli = 0.001
1004
- nan = nan
1005
- nano = 1e-09
1006
- peta = 1000000000000000
1007
- phi = 1.618033988749895
1008
- pi = 3.141592653589793
1009
- pico = 1e-12
1010
- qe = 1.60217733e-19
1011
- tera = 1000000000000
1012
- yocto = 1e-24
1013
- yotta = 1000000000000000000000000
1014
- zepto = 1e-21
1015
- zetta = 1000000000000000000000
1016
- equations [Solving specific forms of equations]
1017
- FUNCTIONS
1018
- linear_equation(left: list, right: list) -> list
1019
- polynomial_equation(coefficients: list) -> list
1020
- maths [Mathematical functions]
1021
- FUNCTIONS
1022
- root(x: num, y: num) -> num
1023
- exp(x: real) -> real
1024
- ln(x: real) -> real
1025
- gcd(*args: int) -> int
1026
- lcm(*args: int) -> int
1027
- sin(x: real) -> real
1028
- cos(x: real) -> real
1029
- tan(x: real) -> real
1030
- csc(x: real) -> real
1031
- sec(x: real) -> real
1032
- cot(x: real) -> real
1033
- asin(x: real) -> real
1034
- acos(x: real) -> real
1035
- atan(x: real) -> real
1036
- acsc(x: real) -> real
1037
- asec(x: real) -> real
1038
- acot(x: real) -> real
1039
- sinh(x: real) -> real
1040
- cosh(x: real) -> real
1041
- tanh(x: real) -> real
1042
- csch(x: real) -> real
1043
- sech(x: real) -> real
1044
- coth(x: real) -> real
1045
- asinh(x: real) -> real
1046
- acosh(x: real) -> real
1047
- atanh(x: real) -> real
1048
- acsch(x: real) -> real
1049
- asech(x: real) -> real
1050
- acoth(x: real) -> real
1051
- ptp(numbers: arr) -> num
1052
- median(numbers: arr) -> num
1053
- freq(data: arr) -> dict
1054
- mode(data: arr)
1055
- mean(numbers: arr) -> num
1056
- geom_mean(numbers: arr) -> num
1057
- square_mean(numbers: arr) -> num
1058
- harm_mean(numbers: arr) -> num
1059
- raw_moment(data: arr, order: int) -> float
1060
- central_moment(data: arr, order: int) -> float
1061
- var(numbers: arr, ddof: int = 0) -> num
1062
- skew(data: arr) -> float
1063
- kurt(data: arr) -> float
1064
- std(numbers: arr, ddof: int = 0) -> num
1065
- cov(x: arr, y: arr, ddof: int = 0) -> num
1066
- corr_coeff(x: arr, y: arr) -> num
1067
- coeff_det(x: arr, y: arr) -> num
1068
- product(numbers: arr) -> num
1069
- sigma(i: int, n: int, f) -> num
1070
- pi(i: int, n: int, f) -> num
1071
- derivative(f, x: real, h: real = 1e-7) -> float
1072
- definite_integral(f, x_start: real, x_end: real, n: int = 10000000) -> float
1073
- beta(p: real, q: real) -> real
1074
- gamma(alpha: real) -> float
1075
- factorial(n: int) -> int
1076
- arrangement(n: int, r: int) -> int
1077
- combination(n: int, r: int) -> int
1078
- zeta(alpha: real) -> float
1079
- gaussian(x: real, _mu: real = 0, _sigma: real = 1) -> float
1080
- poisson(x: int, _lambda: real) -> float
1081
- erf(x: real) -> float
1082
- sigmoid(x: real) -> float
1083
- sign(x: real) -> int
1084
- parity(x: int) -> int
1085
- cumsum(lst: arr) -> list
1086
- cumprod(lst: arr) -> list
1087
- iroot(y: int, n: int) -> int
1088
- totient(n: int) -> int
1089
- mod_order(a: int, n: int, b: int) -> int
1090
- primitive_root(a: int, single: bool = False) -> Union[int, list]
1091
- normalize(data: arr, target: num = 1) -> arr
1092
- average(data, weights, expected=False)
1093
- exgcd(a: int, b: int) -> tuple
1094
- crt(n: arr, a: arr) -> int
1095
- isqrt(x: int) -> int
1096
- is_possibly_square(n: int) -> bool
1097
- is_square(n: int) -> bool
1098
- numbers [Conversion of various numbers]
1099
- FUNCTIONS
1100
- float2fraction(number: float, mixed: bool = False, error: float = 1e-15) -> tuple
1101
- int2roman(integer: int, overline: bool = True) -> str
1102
- roman2int(roman_num: str) -> int
1103
- str2int(string: str) -> int
1104
- DATA
1105
- roman_symbols = ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"]
1106
- roman_values = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
1107
- plotting [Draw a graph of equations using characters]
1108
- FUNCTIONS
1109
- color(text: str, rgb: arr) -> str
1110
- change(data: thing) -> thing
1111
- background(right: real = 5, left: real = -5, top: real = 5, bottom: real = -5...
1112
- unary(function, right: real = 5, left: real = -5, top: real = 5, bottom: real = -5, complexity: real = 5...
1113
- binary(function, right: real = 5, left: real = -5, top: real = 5, bottom: real = -5, complexity: real = 5...
1114
- c_unary(function, start: real, end: real, interval: real = 5, projection: str = "ri", right: real = 5...
1115
- polynomial [Polynomial object]
1116
- CLASSES
1117
- Polynomial
1118
- FUNCTIONS
1119
- poly(terms=None)
1120
- probability [Probability function]
1121
- FUNCTIONS
1122
- binomial(sample_size: int, successes: int, success_probability: Union[int, float]) -> float
1123
- hypergeometric(total_items: int, success_items: int, sample_size: int, successes_in_sample: int) -> float
1124
- random [Generate random numbers or random arrays]
1125
- FUNCTIONS
1126
- choice(seq: Union[list, tuple, str], shape: Union[list, tuple] = None)
1127
- gauss(mu: Union[int, float] = 0, sigma: Union[int, float] = 1, shape: Union[list, tuple] = None) -> Union[float, list]
1128
- gauss_error(original: Union[list, tuple], mu: Union[int, float] = 0, sigma: Union[int, float] = 1) -> list
1129
- rand(shape: Union[list, tuple] = None) -> Union[float, list]
1130
- randint(a: int, b: int, shape: Union[list, tuple] = None) -> Union[int, list]
1131
- uniform(a: Union[int, float], b: Union[int, float], shape: Union[list, tuple] = None) -> Union[float, list]
1132
- regression [Formula based polynomial regression]
1133
- FUNCTIONS
1134
- linear_regression(x: Union[list, tuple], y: Union[list, tuple]) -> list
1135
- parabolic_regression(x: Union[list, tuple], y: Union[list, tuple]) -> list
1136
- polynomial_regression(x: Union[list, tuple], y: Union[list, tuple], n: int = None) -> list
1137
- sequence [Various sequences]
1138
- FUNCTIONS
1139
- farey(n: int) -> list
1140
- fibonacci(n: int, single: bool = True) -> Union[int, list]
1141
- catalan(n: int, single: bool = True) -> Union[int, list]
1142
- bernoulli(n: int, single: bool = True) -> list
1143
- recaman(n: int, single: bool = True) -> Union[int, list]
1144
- arithmetic_sequence(*, a1: real = None, an: real = None, d: real = None, n: real = None, s: real = None) -> dict
1145
- geometric_sequence(*, a1: real = None, an: real = None, r: real = None, n: real = None, s: real = None) -> dict
1146
- ★ tools [Other useful tools]
1147
- FUNCTIONS
1148
- frange(start: real, stop: real, step: float = 1.0) -> list
1149
- linspace(start: real, stop: real, number: int) -> list
1150
- geomspace(start: real, stop: real, number: int) -> list
1151
- deduplicate(iterable: ite) -> ite
1152
- classify(array: arr) -> dict
1153
- split(iterable: ite, key: arr, retain: bool = False) -> list
1154
- interpolation(data: arr, length: int) -> list
1155
- primality(n: int, iter_num: int = 10) -> bool
1156
- generate_primes(limit: int) -> list
1157
- prime_factors(integer: int, dictionary: bool = False, pollard_rho: bool = True) -> Union[list, dict]
1158
- magic_square(n)
1159
- ★ utils [Other useful tools]
1160
- CLASSES
1161
- InfIterator
1162
- OrderedSet
821
+ ├── Array
822
+ │ ├── CLASS
823
+ │ │ └── Array(object)/__init__(self: Any, data: Any, check: Any) -> Any
824
+ │ └── FUNCTION
825
+ │ ├── array(data: Any) -> Any
826
+ │ ├── fill(shape: Any, sequence: Any, repeat: Any, pad: Any) -> Any
827
+ │ ├── function(_array: Any, _function: Any, args: Any) -> Any
828
+ │ ├── get_shape(data: Any) -> Any
829
+ │ ├── is_valid_array(_array: Any, _shape: Any) -> Any
830
+ │ ├── zeros(shape: Any) -> Any
831
+ │ └── zeros_like(_nested_list: Any) -> Any
832
+ ├── FourierT
833
+ │ ├── CLASS
834
+ │ │ └── FT1D(object)/__init__(self: Any, data: Any) -> Any
835
+ │ └── FUNCTION
836
+ ├── Geometry
837
+ │ ├── CLASS
838
+ │ │ ├── Circle(object)/__init__(self: Any, center: typing.Union[list, tuple], radius: typing.Union[int, float]) -> Any
839
+ │ │ ├── Line(object)/__init__(self: Any, a: typing.Union[list, tuple], b: typing.Union[list, tuple]) -> Any
840
+ │ │ ├── Point(object)/__init__(self: Any, p: typing.Union[list, tuple]) -> Any
841
+ │ │ ├── Polygon(object)/__init__(self: Any, p: typing.Union[list, tuple]) -> Any
842
+ │ │ ├── Quadrilateral(object)/__init__(self: Any, a: typing.Union[list, tuple], b: typing.Union[list, tuple], c: typing.Union[list, tuple], d: typing.Union[list, tuple]) -> Any
843
+ │ │ └── Triangle(object)/__init__(self: Any, a: typing.Union[list, tuple], b: typing.Union[list, tuple], c: typing.Union[list, tuple]) -> Any
844
+ │ └── FUNCTION
845
+ │ └── distance(g1: Any, g2: Any, error: typing.Union[int, float]) -> float
846
+ ├── Graph
847
+ │ ├── CLASS
848
+ │ │ ├── BaseGraph(object)/__init__(self: Any) -> Any
849
+ │ │ ├── BaseWeGraph(pypynum.Graph.BaseGraph)/__init__(self: Any) -> Any
850
+ │ │ ├── DiGraph(pypynum.Graph.BaseGraph)/__init__(self: Any) -> Any
851
+ │ │ ├── UnGraph(pypynum.Graph.BaseGraph)/__init__(self: Any) -> Any
852
+ │ │ ├── WeDiGraph(pypynum.Graph.BaseWeGraph)/__init__(self: Any) -> Any
853
+ │ │ └── WeUnGraph(pypynum.Graph.BaseWeGraph)/__init__(self: Any) -> Any
854
+ │ └── FUNCTION
855
+ ├── Group
856
+ │ ├── CLASS
857
+ │ │ └── Group(object)/__init__(self: Any, data: Any) -> Any
858
+ │ └── FUNCTION
859
+ │ ├── add(x: Any, y: Any) -> Any
860
+ │ ├── divide(x: Any, y: Any) -> Any
861
+ │ ├── group(data: Any) -> Any
862
+ │ ├── multiply(x: Any, y: Any) -> Any
863
+ │ └── subtract(x: Any, y: Any) -> Any
864
+ ├── Logic
865
+ │ ├── CLASS
866
+ │ │ ├── AND(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
867
+ │ │ ├── Basic(object)/__init__(self: Any, label: Any) -> Any
868
+ │ │ ├── Binary(pypynum.Logic.Basic)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
869
+ │ │ ├── COMP(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
870
+ │ │ ├── DFF(pypynum.Logic.Unary)/__init__(self: Any, label: Any, pin0: Any, state: Any) -> Any
871
+ │ │ ├── FullAdder(pypynum.Logic.Ternary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any) -> Any
872
+ │ │ ├── FullSuber(pypynum.Logic.Ternary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any) -> Any
873
+ │ │ ├── HalfAdder(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
874
+ │ │ ├── HalfSuber(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
875
+ │ │ ├── JKFF(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, state: Any) -> Any
876
+ │ │ ├── NAND(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
877
+ │ │ ├── NOR(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
878
+ │ │ ├── NOT(pypynum.Logic.Unary)/__init__(self: Any, label: Any, pin0: Any) -> Any
879
+ │ │ ├── OR(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
880
+ │ │ ├── Quaternary(pypynum.Logic.Basic)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any, pin3: Any) -> Any
881
+ │ │ ├── TFF(pypynum.Logic.Unary)/__init__(self: Any, label: Any, pin0: Any, state: Any) -> Any
882
+ │ │ ├── Ternary(pypynum.Logic.Basic)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any) -> Any
883
+ │ │ ├── TwoBDiver(pypynum.Logic.Quaternary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any, pin3: Any) -> Any
884
+ │ │ ├── TwoBMuler(pypynum.Logic.Quaternary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any, pin3: Any) -> Any
885
+ │ │ ├── Unary(pypynum.Logic.Basic)/__init__(self: Any, label: Any, pin0: Any) -> Any
886
+ │ │ ├── XNOR(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
887
+ │ │ └── XOR(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
888
+ │ └── FUNCTION
889
+ │ └── connector(previous: Any, latter: Any) -> Any
890
+ ├── Matrix
891
+ │ ├── CLASS
892
+ │ │ └── Matrix(pypynum.Array.Array)/__init__(self: Any, data: Any, check: Any) -> Any
893
+ │ └── FUNCTION
894
+ │ ├── eigen(matrix: pypynum.Matrix.Matrix) -> tuple
895
+ │ ├── hessenberg(matrix: pypynum.Matrix.Matrix) -> tuple
896
+ │ ├── identity(n: int) -> pypynum.Matrix.Matrix
897
+ │ ├── lu(matrix: pypynum.Matrix.Matrix) -> tuple
898
+ │ ├── mat(data: Any) -> Any
899
+ │ ├── qr(matrix: pypynum.Matrix.Matrix) -> tuple
900
+ │ ├── rotate90(matrix: pypynum.Matrix.Matrix, times: int) -> pypynum.Matrix.Matrix
901
+ │ ├── same(rows: Any, cols: Any, value: Any) -> Any
902
+ │ ├── svd(matrix: pypynum.Matrix.Matrix) -> tuple
903
+ │ ├── tril_indices(n: int, k: int, m: int) -> tuple
904
+ │ ├── zeros(_dimensions: Any) -> Any
905
+ │ └── zeros_like(_nested_list: Any) -> Any
906
+ ├── NeuralN
907
+ │ ├── CLASS
908
+ │ │ └── NeuralNetwork(object)/__init__(self: Any, _input: Any, _hidden: Any, _output: Any) -> Any
909
+ │ └── FUNCTION
910
+ │ └── neuraln(_input: Any, _hidden: Any, _output: Any) -> Any
911
+ ├── Quaternion
912
+ │ ├── CLASS
913
+ │ │ ├── Euler(object)/__init__(self: Any, y: typing.Union[int, float], p: typing.Union[int, float], r: typing.Union[int, float]) -> Any
914
+ │ │ └── Quaternion(object)/__init__(self: Any, w: typing.Union[int, float], x: typing.Union[int, float], y: typing.Union[int, float], z: typing.Union[int, float]) -> Any
915
+ │ └── FUNCTION
916
+ │ ├── change(data: typing.Union[pypynum.Quaternion.Quaternion, pypynum.Matrix.Matrix, pypynum.Quaternion.Euler], to: str) -> typing.Union[pypynum.Quaternion.Quaternion, pypynum.Matrix.Matrix, pypynum.Quaternion.Euler]
917
+ │ ├── euler(yaw: typing.Union[int, float], pitch: typing.Union[int, float], roll: typing.Union[int, float]) -> pypynum.Quaternion.Euler
918
+ │ └── quat(w: typing.Union[int, float], x: typing.Union[int, float], y: typing.Union[int, float], z: typing.Union[int, float]) -> pypynum.Quaternion.Quaternion
919
+ ├── Symbolics
920
+ │ ├── CLASS
921
+ │ └── FUNCTION
922
+ │ └── parse_expr(expr: str) -> list
923
+ ├── Tensor
924
+ │ ├── CLASS
925
+ │ │ └── Tensor(pypynum.Array.Array)/__init__(self: Any, data: Any, check: Any) -> Any
926
+ │ └── FUNCTION
927
+ │ ├── ten(data: list) -> pypynum.Tensor.Tensor
928
+ │ ├── tensor_and_number(tensor: Any, operator: Any, number: Any) -> Any
929
+ │ ├── tensorproduct(tensors: pypynum.Tensor.Tensor) -> pypynum.Tensor.Tensor
930
+ │ ├── zeros(_dimensions: Any) -> Any
931
+ │ └── zeros_like(_nested_list: Any) -> Any
932
+ ├── Tree
933
+ │ ├── CLASS
934
+ │ │ ├── MultiTree(object)/__init__(self: Any, root: Any) -> Any
935
+ │ │ └── MultiTreeNode(object)/__init__(self: Any, data: Any) -> Any
936
+ │ └── FUNCTION
937
+ ├── Vector
938
+ │ ├── CLASS
939
+ │ │ └── Vector(pypynum.Array.Array)/__init__(self: Any, data: Any, check: Any) -> Any
940
+ │ └── FUNCTION
941
+ │ ├── same(length: Any, value: Any) -> Any
942
+ │ ├── vec(data: Any) -> Any
943
+ │ ├── zeros(_dimensions: Any) -> Any
944
+ │ └── zeros_like(_nested_list: Any) -> Any
945
+ ├── chars
946
+ │ ├── CLASS
947
+ │ └── FUNCTION
948
+ ├── cipher
949
+ │ ├── CLASS
950
+ │ └── FUNCTION
951
+ │ ├── atbash(text: str) -> str
952
+ │ ├── base_64(text: str, decrypt: bool) -> str
953
+ │ ├── caesar(text: str, shift: int, decrypt: bool) -> str
954
+ │ ├── hill256(text: bytes, key: list, decrypt: bool) -> bytes
955
+ │ ├── ksa(key: bytes) -> list
956
+ │ ├── morse(text: str, decrypt: bool) -> str
957
+ │ ├── playfair(text: str, key: str, decrypt: bool) -> str
958
+ │ ├── prga(s: list) -> Any
959
+ │ ├── rc4(text: bytes, key: bytes) -> bytes
960
+ │ ├── rot13(text: str) -> str
961
+ │ ├── substitution(text: str, sub_map: dict, decrypt: bool) -> str
962
+ │ └── vigenere(text: str, key: str, decrypt: bool) -> str
963
+ ├── constants
964
+ │ ├── CLASS
965
+ │ └── FUNCTION
966
+ ├── equations
967
+ │ ├── CLASS
968
+ │ └── FUNCTION
969
+ │ ├── linear_equation(left: list, right: list) -> list
970
+ │ └── polynomial_equation(coefficients: list) -> list
971
+ ├── errors
972
+ │ ├── CLASS
973
+ │ └── FUNCTION
974
+ ├── file
975
+ │ ├── CLASS
976
+ │ └── FUNCTION
977
+ │ ├── read(file: str) -> list
978
+ │ └── write(file: str, cls: object) -> Any
979
+ ├── maths
980
+ │ ├── CLASS
981
+ │ └── FUNCTION
982
+ │ ├── arrangement(n: int, r: int) -> int
983
+ │ ├── combination(n: int, r: int) -> int
984
+ │ ├── acos(x: typing.Union[int, float]) -> typing.Union[int, float]
985
+ │ ├── acosh(x: typing.Union[int, float]) -> typing.Union[int, float]
986
+ │ ├── acot(x: typing.Union[int, float]) -> typing.Union[int, float]
987
+ │ ├── acoth(x: typing.Union[int, float]) -> typing.Union[int, float]
988
+ │ ├── acsc(x: typing.Union[int, float]) -> typing.Union[int, float]
989
+ │ ├── acsch(x: typing.Union[int, float]) -> typing.Union[int, float]
990
+ │ ├── arrangement(n: int, r: int) -> int
991
+ │ ├── asec(x: typing.Union[int, float]) -> typing.Union[int, float]
992
+ │ ├── asech(x: typing.Union[int, float]) -> typing.Union[int, float]
993
+ │ ├── asin(x: typing.Union[int, float]) -> typing.Union[int, float]
994
+ │ ├── asinh(x: typing.Union[int, float]) -> typing.Union[int, float]
995
+ │ ├── atan(x: typing.Union[int, float]) -> typing.Union[int, float]
996
+ │ ├── atanh(x: typing.Union[int, float]) -> typing.Union[int, float]
997
+ │ ├── average(data: Any, weights: Any, expected: Any) -> Any
998
+ │ ├── beta(p: typing.Union[int, float], q: typing.Union[int, float]) -> typing.Union[int, float]
999
+ │ ├── central_moment(data: typing.Union[list, tuple], order: int) -> float
1000
+ │ ├── coeff_det(x: typing.Union[list, tuple], y: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1001
+ │ ├── combination(n: int, r: int) -> int
1002
+ │ ├── corr_coeff(x: typing.Union[list, tuple], y: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1003
+ │ ├── cos(x: typing.Union[int, float]) -> typing.Union[int, float]
1004
+ │ ├── cosh(x: typing.Union[int, float]) -> typing.Union[int, float]
1005
+ │ ├── cot(x: typing.Union[int, float]) -> typing.Union[int, float]
1006
+ │ ├── coth(x: typing.Union[int, float]) -> typing.Union[int, float]
1007
+ │ ├── cov(x: typing.Union[list, tuple], y: typing.Union[list, tuple], dof: int) -> typing.Union[int, float, complex]
1008
+ │ ├── crt(n: typing.Union[list, tuple], a: typing.Union[list, tuple]) -> int
1009
+ │ ├── csc(x: typing.Union[int, float]) -> typing.Union[int, float]
1010
+ │ ├── csch(x: typing.Union[int, float]) -> typing.Union[int, float]
1011
+ │ ├── cumprod(lst: typing.Union[list, tuple]) -> list
1012
+ │ ├── cumsum(lst: typing.Union[list, tuple]) -> list
1013
+ │ ├── definite_integral(f: Any, x_start: typing.Union[int, float], x_end: typing.Union[int, float], n: int, args: Any, kwargs: Any) -> float
1014
+ │ ├── derivative(f: Any, x: typing.Union[int, float], h: typing.Union[int, float], args: Any, kwargs: Any) -> float
1015
+ │ ├── erf(x: typing.Union[int, float]) -> float
1016
+ │ ├── exgcd(a: int, b: int) -> tuple
1017
+ │ ├── exp(x: typing.Union[int, float]) -> typing.Union[int, float]
1018
+ │ ├── factorial(n: int) -> int
1019
+ │ ├── freq(data: typing.Union[list, tuple]) -> dict
1020
+ │ ├── gamma(alpha: typing.Union[int, float]) -> float
1021
+ │ ├── gaussian(x: typing.Union[int, float], _mu: typing.Union[int, float], _sigma: typing.Union[int, float]) -> float
1022
+ │ ├── gcd(args: int) -> int
1023
+ │ ├── geom_mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1024
+ │ ├── harm_mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1025
+ │ ├── iroot(y: int, n: int) -> int
1026
+ │ ├── is_possibly_square(n: int) -> bool
1027
+ │ ├── is_square(n: int) -> bool
1028
+ │ ├── isqrt(x: int) -> int
1029
+ │ ├── kurt(data: typing.Union[list, tuple]) -> float
1030
+ │ ├── lcm(args: int) -> int
1031
+ │ ├── ln(x: typing.Union[int, float]) -> typing.Union[int, float]
1032
+ │ ├── mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1033
+ │ ├── median(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1034
+ │ ├── mod_order(a: int, n: int, b: int) -> int
1035
+ │ ├── mode(data: typing.Union[list, tuple]) -> Any
1036
+ │ ├── normalize(data: typing.Union[list, tuple], target: typing.Union[int, float, complex]) -> typing.Union[list, tuple]
1037
+ │ ├── parity(x: int) -> int
1038
+ │ ├── pi(i: int, n: int, f: Any) -> typing.Union[int, float, complex]
1039
+ │ ├── poisson(x: int, _lambda: typing.Union[int, float]) -> float
1040
+ │ ├── primitive_root(a: int, single: bool) -> typing.Union[int, list]
1041
+ │ ├── product(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1042
+ │ ├── ptp(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1043
+ │ ├── raw_moment(data: typing.Union[list, tuple], order: int) -> float
1044
+ │ ├── root(x: typing.Union[int, float, complex], y: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
1045
+ │ ├── sec(x: typing.Union[int, float]) -> typing.Union[int, float]
1046
+ │ ├── sech(x: typing.Union[int, float]) -> typing.Union[int, float]
1047
+ │ ├── sigma(i: int, n: int, f: Any) -> typing.Union[int, float, complex]
1048
+ │ ├── sigmoid(x: typing.Union[int, float]) -> float
1049
+ │ ├── sign(x: typing.Union[int, float]) -> int
1050
+ │ ├── sin(x: typing.Union[int, float]) -> typing.Union[int, float]
1051
+ │ ├── sinh(x: typing.Union[int, float]) -> typing.Union[int, float]
1052
+ │ ├── skew(data: typing.Union[list, tuple]) -> float
1053
+ │ ├── square_mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1054
+ │ ├── std(numbers: typing.Union[list, tuple], dof: int) -> typing.Union[int, float, complex]
1055
+ │ ├── tan(x: typing.Union[int, float]) -> typing.Union[int, float]
1056
+ │ ├── tanh(x: typing.Union[int, float]) -> typing.Union[int, float]
1057
+ │ ├── totient(n: int) -> int
1058
+ │ ├── var(numbers: typing.Union[list, tuple], dof: int) -> typing.Union[int, float, complex]
1059
+ │ └── zeta(alpha: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
1060
+ ├── numbers
1061
+ │ ├── CLASS
1062
+ │ └── FUNCTION
1063
+ │ ├── float2fraction(number: float, mixed: bool, error: float) -> tuple
1064
+ │ ├── int2roman(integer: int, overline: bool) -> str
1065
+ │ ├── roman2int(roman_num: str) -> int
1066
+ │ └── str2int(string: str) -> int
1067
+ ├── plotting
1068
+ │ ├── CLASS
1069
+ │ └── FUNCTION
1070
+ │ ├── background(right: typing.Union[int, float], left: typing.Union[int, float], top: typing.Union[int, float], bottom: typing.Union[int, float], complexity: typing.Union[int, float], ratio: typing.Union[int, float], string: bool) -> typing.Union[list, str]
1071
+ │ ├── binary(function: Any, right: typing.Union[int, float], left: typing.Union[int, float], top: typing.Union[int, float], bottom: typing.Union[int, float], complexity: typing.Union[int, float], ratio: typing.Union[int, float], error: Any, compare: Any, string: bool, basic: list, character: str, data: bool, coloration: Any) -> typing.Union[list, str]
1072
+ │ ├── c_unary(function: Any, projection: str, right: typing.Union[int, float], left: typing.Union[int, float], top: typing.Union[int, float], bottom: typing.Union[int, float], complexity: typing.Union[int, float], ratio: typing.Union[int, float], string: bool, basic: list, character: str, data: bool, coloration: Any) -> typing.Union[list, str]
1073
+ │ ├── change(data: typing.Union[list, str]) -> typing.Union[list, str]
1074
+ │ ├── color(text: str, rgb: typing.Union[list, tuple]) -> str
1075
+ │ └── unary(function: Any, right: typing.Union[int, float], left: typing.Union[int, float], top: typing.Union[int, float], bottom: typing.Union[int, float], complexity: typing.Union[int, float], ratio: typing.Union[int, float], string: bool, basic: list, character: str, data: bool, coloration: Any) -> typing.Union[list, str]
1076
+ ├── polynomial
1077
+ │ ├── CLASS
1078
+ │ │ └── Polynomial(object)/__init__(self: Any, terms: Any) -> Any
1079
+ │ └── FUNCTION
1080
+ │ └── poly(terms: Any) -> Any
1081
+ ├── probability
1082
+ │ ├── CLASS
1083
+ │ └── FUNCTION
1084
+ │ ├── binomial(sample_size: int, successes: int, success_probability: typing.Union[int, float]) -> float
1085
+ │ ├── chi2_cont(contingency: list, calc_p: bool, corr: bool) -> tuple
1086
+ │ ├── chi2_pdf(x: typing.Union[int, float], k: typing.Union[int, float]) -> float
1087
+ │ └── hypergeometric(total_items: int, success_items: int, sample_size: int, successes_in_sample: int) -> float
1088
+ ├── random
1089
+ │ ├── CLASS
1090
+ │ └── FUNCTION
1091
+ │ ├── choice(seq: typing.Union[list, tuple, str], shape: typing.Union[list, tuple]) -> Any
1092
+ │ ├── gauss(mu: typing.Union[int, float], sigma: typing.Union[int, float], shape: typing.Union[list, tuple]) -> typing.Union[float, list]
1093
+ │ ├── gauss_error(original: typing.Union[list, tuple], mu: typing.Union[int, float], sigma: typing.Union[int, float]) -> list
1094
+ │ ├── rand(shape: typing.Union[list, tuple]) -> typing.Union[float, list]
1095
+ │ ├── randint(a: int, b: int, shape: typing.Union[list, tuple]) -> typing.Union[int, list]
1096
+ │ └── uniform(a: typing.Union[int, float], b: typing.Union[int, float], shape: typing.Union[list, tuple]) -> typing.Union[float, list]
1097
+ ├── regression
1098
+ │ ├── CLASS
1099
+ │ └── FUNCTION
1100
+ │ ├── linear_regression(x: typing.Union[list, tuple], y: typing.Union[list, tuple]) -> list
1101
+ │ ├── parabolic_regression(x: typing.Union[list, tuple], y: typing.Union[list, tuple]) -> list
1102
+ │ └── polynomial_regression(x: typing.Union[list, tuple], y: typing.Union[list, tuple], n: int) -> list
1103
+ ├── sequence
1104
+ │ ├── CLASS
1105
+ │ └── FUNCTION
1106
+ │ ├── arithmetic_sequence(a1: typing.Union[int, float], an: typing.Union[int, float], d: typing.Union[int, float], n: typing.Union[int, float], s: typing.Union[int, float]) -> dict
1107
+ │ ├── bernoulli(n: int, single: bool) -> list
1108
+ │ ├── catalan(n: int, single: bool) -> typing.Union[int, list]
1109
+ │ ├── farey(n: int) -> list
1110
+ │ ├── fibonacci(n: int, single: bool) -> typing.Union[int, list]
1111
+ │ ├── geometric_sequence(a1: typing.Union[int, float], an: typing.Union[int, float], r: typing.Union[int, float], n: typing.Union[int, float], s: typing.Union[int, float]) -> dict
1112
+ │ └── recaman(n: int, single: bool) -> typing.Union[int, list]
1113
+ ├── test
1114
+ │ ├── CLASS
1115
+ │ └── FUNCTION
1116
+ ├── this
1117
+ │ ├── CLASS
1118
+ │ └── FUNCTION
1119
+ ├── tools
1120
+ │ ├── CLASS
1121
+ │ └── FUNCTION
1122
+ │ ├── classify(array: typing.Union[list, tuple]) -> dict
1123
+ │ ├── dedup(iterable: typing.Union[list, tuple, str]) -> typing.Union[list, tuple, str]
1124
+ │ ├── frange(start: typing.Union[int, float], stop: typing.Union[int, float], step: float) -> list
1125
+ │ ├── generate_primes(limit: int) -> list
1126
+ │ ├── generate_semiprimes(limit: int) -> list
1127
+ │ ├── geomspace(start: typing.Union[int, float], stop: typing.Union[int, float], number: int) -> list
1128
+ │ ├── interp(data: typing.Union[list, tuple], length: int) -> list
1129
+ │ ├── linspace(start: typing.Union[int, float], stop: typing.Union[int, float], number: int) -> list
1130
+ │ ├── magic_square(n: Any) -> Any
1131
+ │ ├── primality(n: int, iter_num: int) -> bool
1132
+ │ ├── prime_factors(integer: int, dictionary: bool, pollard_rho: bool) -> typing.Union[list, dict]
1133
+ │ └── split(iterable: typing.Union[list, tuple, str], key: typing.Union[list, tuple], retain: bool) -> list
1134
+ ├── types
1135
+ │ ├── CLASS
1136
+ │ └── FUNCTION
1137
+ ├── ufuncs
1138
+ │ ├── CLASS
1139
+ │ └── FUNCTION
1140
+ │ ├── add(x: Any, y: Any) -> Any
1141
+ │ ├── divide(x: Any, y: Any) -> Any
1142
+ │ ├── floor_divide(x: Any, y: Any) -> Any
1143
+ │ ├── modulo(x: Any, y: Any) -> Any
1144
+ │ ├── multiply(x: Any, y: Any) -> Any
1145
+ │ ├── power(x: Any, y: Any, m: Any) -> Any
1146
+ │ └── subtract(x: Any, y: Any) -> Any
1147
+ └── utils
1148
+ ├── CLASS
1149
+ │ ├── InfIterator(object)/__init__(self: Any, start: typing.Union[int, float, complex], mode: str, common: typing.Union[int, float, complex]) -> Any
1150
+ │ ├── LinkedList(object)/__init__(self: Any) -> Any
1151
+ │ ├── LinkedListNode(object)/__init__(self: Any, value: Any, next_node: Any) -> Any
1152
+ │ └── OrderedSet(object)/__init__(self: Any, sequence: Any) -> Any
1153
+ └── FUNCTION
1163
1154
  ```
1164
1155
 
1165
1156
  ### 代码测试
1166
1157
 
1167
1158
  #### Code testing
1168
1159
 
1169
- ```
1170
- >>> from pypynum import (Array, Geometry, Logic, Matrix, Quaternion, Symbolics, Tensor, Vector,
1171
- cipher, constants, equations, maths, plotting, random, regression, tools)
1160
+ ```python
1161
+ from pypynum import (Array, Geometry, Logic, Matrix, Quaternion, Symbolics, Tensor, Vector,
1162
+ cipher, constants, equations, maths, plotting, random, regression, tools)
1172
1163
 
1173
1164
  ...
1174
1165
 
1175
- >>> print(Array.array())
1176
- >>> print(Array.array([1, 2, 3, 4, 5, 6, 7, 8]))
1177
- >>> print(Array.array([[1, 2, 3, 4], [5, 6, 7, 8]]))
1178
- >>> print(Array.array([[[1, 2], [3, 4]], [[5, 6], [7, 8]]]))
1166
+ print(Array.array())
1167
+ print(Array.array([1, 2, 3, 4, 5, 6, 7, 8]))
1168
+ print(Array.array([[1, 2, 3, 4], [5, 6, 7, 8]]))
1169
+ print(Array.array([[[1, 2], [3, 4]], [[5, 6], [7, 8]]]))
1179
1170
 
1171
+ """
1180
1172
  []
1181
1173
  [1 2 3 4 5 6 7 8]
1182
1174
  [[1 2 3 4]
@@ -1186,40 +1178,46 @@ PyPyNum
1186
1178
 
1187
1179
  [[5 6]
1188
1180
  [7 8]]]
1181
+ """
1189
1182
 
1190
- >>> triangle = Geometry.Triangle((0, 0), (2, 2), (3, 0))
1191
- >>> print(triangle.perimeter())
1192
- >>> print(triangle.area())
1193
- >>> print(triangle.centroid())
1183
+ triangle = Geometry.Triangle((0, 0), (2, 2), (3, 0))
1184
+ print(triangle.perimeter())
1185
+ print(triangle.area())
1186
+ print(triangle.centroid())
1194
1187
 
1188
+ """
1195
1189
  8.06449510224598
1196
1190
  3.0
1197
1191
  (1.6666666666666667, 0.6666666666666666)
1198
-
1199
- >>> a, b, c = 1, 1, 1
1200
- >>> adder0, adder1 = Logic.HalfAdder("alpha", a, b), Logic.HalfAdder("beta", c, None)
1201
- >>> xor0 = Logic.XOR("alpha")
1202
- >>> ff0, ff1 = Logic.DFF("alpha"), Logic.DFF("beta")
1203
- >>> xor0.set_order0(1)
1204
- >>> xor0.set_order1(1)
1205
- >>> Logic.connector(adder0, adder1)
1206
- >>> Logic.connector(adder0, xor0)
1207
- >>> Logic.connector(adder1, xor0)
1208
- >>> Logic.connector(adder1, ff0)
1209
- >>> Logic.connector(xor0, ff1)
1210
- >>> print("sum: {}, carry: {}".format(ff0.out(), ff1.out()))
1211
-
1192
+ """
1193
+
1194
+ a, b, c = 1, 1, 1
1195
+ adder0, adder1 = Logic.HalfAdder("alpha", a, b), Logic.HalfAdder("beta", c, None)
1196
+ xor0 = Logic.XOR("alpha")
1197
+ ff0, ff1 = Logic.DFF("alpha"), Logic.DFF("beta")
1198
+ xor0.set_order0(1)
1199
+ xor0.set_order1(1)
1200
+ Logic.connector(adder0, adder1)
1201
+ Logic.connector(adder0, xor0)
1202
+ Logic.connector(adder1, xor0)
1203
+ Logic.connector(adder1, ff0)
1204
+ Logic.connector(xor0, ff1)
1205
+ print("sum: {}, carry: {}".format(ff0.out(), ff1.out()))
1206
+
1207
+ """
1212
1208
  sum: [1], carry: [1]
1213
-
1214
- >>> m0 = Matrix.mat([[1, 2], [3, 4]])
1215
- >>> m1 = Matrix.mat([[5, 6], [7, 8]])
1216
- >>> print(m0)
1217
- >>> print(m1)
1218
- >>> print(m0 + m1)
1219
- >>> print(m0 @ m1)
1220
- >>> print(m0.inv())
1221
- >>> print(m1.rank())
1222
-
1209
+ """
1210
+
1211
+ m0 = Matrix.mat([[1, 2], [3, 4]])
1212
+ m1 = Matrix.mat([[5, 6], [7, 8]])
1213
+ print(m0)
1214
+ print(m1)
1215
+ print(m0 + m1)
1216
+ print(m0 @ m1)
1217
+ print(m0.inv())
1218
+ print(m1.rank())
1219
+
1220
+ """
1223
1221
  [[1 2]
1224
1222
  [3 4]]
1225
1223
  [[5 6]
@@ -1231,40 +1229,46 @@ sum: [1], carry: [1]
1231
1229
  [[-2.0 1.0]
1232
1230
  [ 1.5 -0.5]]
1233
1231
  2
1234
-
1235
- >>> q0 = Quaternion.quat(1, 2, 3, 4)
1236
- >>> q1 = Quaternion.quat(5, 6, 7, 8)
1237
- >>> print(q0)
1238
- >>> print(q1)
1239
- >>> print(q0 + q1)
1240
- >>> print(q0 * q1)
1241
- >>> print(q0.inverse())
1242
- >>> print(q1.conjugate())
1243
-
1232
+ """
1233
+
1234
+ q0 = Quaternion.quat(1, 2, 3, 4)
1235
+ q1 = Quaternion.quat(5, 6, 7, 8)
1236
+ print(q0)
1237
+ print(q1)
1238
+ print(q0 + q1)
1239
+ print(q0 * q1)
1240
+ print(q0.inverse())
1241
+ print(q1.conjugate())
1242
+
1243
+ """
1244
1244
  (1+2i+3j+4k)
1245
1245
  (5+6i+7j+8k)
1246
1246
  (6+8i+10j+12k)
1247
1247
  (-60+12i+30j+24k)
1248
1248
  (0.18257418583505536+-0.3651483716701107i+-0.5477225575051661j+-0.7302967433402214k)
1249
1249
  (5+-6i+-7j+-8k)
1250
+ """
1250
1251
 
1251
- >>> print(Symbolics.basic)
1252
- >>> print(Symbolics.english)
1253
- >>> print(Symbolics.greek)
1254
- >>> print(Symbolics.interpreter("-(10+a-(3.14+b0)*(-5))**(-ζn1-2.718/mΣ99)//9"))
1252
+ print(Symbolics.BASIC)
1253
+ print(Symbolics.ENGLISH)
1254
+ print(Symbolics.GREEK)
1255
+ print(Symbolics.parse_expr("-(10+a-(3.14+b0)*(-5))**(-ζn1-2.718/mΣ99)//9"))
1255
1256
 
1257
+ """
1256
1258
  %()*+-./0123456789
1257
1259
  ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
1258
1260
  ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψω
1259
1261
  [['10', '+', 'a', '-', ['3.14', '+', 'b0'], '*', '-5'], '**', ['-ζn1', '-', '2.718', '/', 'mΣ99'], '//', '9']
1262
+ """
1260
1263
 
1261
- >>> t0 = Tensor.ten([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])
1262
- >>> t1 = Tensor.ten([[[9, 10], [11, 12]], [[13, 14], [15, 16]]])
1263
- >>> print(t0)
1264
- >>> print(t1)
1265
- >>> print(t0 + t1)
1266
- >>> print(t0 @ t1)
1264
+ t0 = Tensor.ten([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])
1265
+ t1 = Tensor.ten([[[9, 10], [11, 12]], [[13, 14], [15, 16]]])
1266
+ print(t0)
1267
+ print(t1)
1268
+ print(t0 + t1)
1269
+ print(t0 @ t1)
1267
1270
 
1271
+ """
1268
1272
  [[[1 2]
1269
1273
  [3 4]]
1270
1274
 
@@ -1285,16 +1289,33 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
1285
1289
 
1286
1290
  [[155 166]
1287
1291
  [211 226]]]
1288
-
1289
- >>> string = "PyPyNum"
1290
- >>> encrypted = cipher.dna(string)
1291
- >>> print(string)
1292
- >>> print(encrypted)
1293
- >>> print(cipher.dna(encrypted, decrypt=True))
1294
-
1292
+ """
1293
+
1294
+ string = "PyPyNum"
1295
+ encrypted = cipher.caesar(string, 10)
1296
+ print(string)
1297
+ print(encrypted)
1298
+ print(cipher.caesar(encrypted, 10, decrypt=True))
1299
+ encrypted = cipher.vigenere(string, "cipher")
1300
+ print(string)
1301
+ print(encrypted)
1302
+ print(cipher.vigenere(encrypted, "cipher", decrypt=True))
1303
+ encrypted = cipher.morse(string)
1304
+ print(string)
1305
+ print(encrypted)
1306
+ print(cipher.morse(encrypted, decrypt=True))
1307
+
1308
+ """
1309
+ PyPyNum
1310
+ ZiZiXew
1311
+ PyPyNum
1295
1312
  PyPyNum
1296
- CCCTAGACCCTCGTCCCGCTAAACCCTG
1313
+ RgEfRlo
1297
1314
  PyPyNum
1315
+ PyPyNum
1316
+ .--. -.-- .--. -.-- -. ..- --
1317
+ PYPYNUM
1318
+ """
1298
1319
 
1299
1320
  v0 = Vector.vec([1, 2, 3, 4])
1300
1321
  v1 = Vector.vec([5, 6, 7, 8])
@@ -1305,29 +1326,33 @@ print(v0 @ v1)
1305
1326
  print(v0.normalize())
1306
1327
  print(v1.angles())
1307
1328
 
1329
+ """
1308
1330
  [1 2 3 4]
1309
1331
  [5 6 7 8]
1310
1332
  [ 5 12 21 32]
1311
1333
  70
1312
1334
  [0.18257418583505536 0.3651483716701107 0.5477225575051661 0.7302967433402214]
1313
1335
  [1.1820279130506308, 1.0985826410133916, 1.0114070854293842, 0.9191723423169716]
1336
+ """
1314
1337
 
1315
- >>> print(constants.TB)
1316
- >>> print(constants.e)
1317
- >>> print(constants.h)
1318
- >>> print(constants.phi)
1319
- >>> print(constants.pi)
1320
- >>> print(constants.tera)
1338
+ print(constants.TB)
1339
+ print(constants.e)
1340
+ print(constants.h)
1341
+ print(constants.phi)
1342
+ print(constants.pi)
1343
+ print(constants.tera)
1321
1344
 
1345
+ """
1322
1346
  1099511627776
1323
1347
  2.718281828459045
1324
1348
  6.62607015e-34
1325
1349
  1.618033988749895
1326
1350
  3.141592653589793
1327
1351
  1000000000000
1352
+ """
1328
1353
 
1329
- >>> p = [1, -2, -3, 4]
1330
- >>> m = [
1354
+ p = [1, -2, -3, 4]
1355
+ m = [
1331
1356
  [
1332
1357
  [1, 2, 3],
1333
1358
  [6, 10, 12],
@@ -1335,33 +1360,38 @@ print(v1.angles())
1335
1360
  ],
1336
1361
  [-1, -2, -3]
1337
1362
  ]
1338
- >>> print(equations.polynomial_equation(p))
1339
- >>> print(equations.linear_equation(*m))
1363
+ print(equations.polynomial_equation(p))
1364
+ print(equations.linear_equation(*m))
1340
1365
 
1366
+ """
1341
1367
  [[(-1.5615528128088307-6.5209667308287455e-24j) 0 0]
1342
1368
  [ 0 (2.5615528128088294+4.456233626665941e-24j) 0]
1343
1369
  [ 0 0 (1.0000000000000007+3.241554513744382e-25j)]]
1344
1370
  [ 1.6666666666666667 -0.6666666666666666 -0.4444444444444444]
1371
+ """
1345
1372
 
1346
- >>> print(maths.cot(constants.pi / 3))
1347
- >>> print(maths.gamma(1.5))
1348
- >>> print(maths.pi(1, 10, lambda x: x ** 2))
1349
- >>> print(maths.product([2, 3, 5, 7, 11, 13, 17, 19, 23, 29]))
1350
- >>> print(maths.sigma(1, 10, lambda x: x ** 2))
1351
- >>> print(maths.var([2, 3, 5, 7, 11, 13, 17, 19, 23, 29]))
1373
+ print(maths.cot(constants.pi / 3))
1374
+ print(maths.gamma(1.5))
1375
+ print(maths.pi(1, 10, lambda x: x ** 2))
1376
+ print(maths.product([2, 3, 5, 7, 11, 13, 17, 19, 23, 29]))
1377
+ print(maths.sigma(1, 10, lambda x: x ** 2))
1378
+ print(maths.var([2, 3, 5, 7, 11, 13, 17, 19, 23, 29]))
1352
1379
 
1380
+ """
1353
1381
  0.577350269189626
1354
1382
  0.886226925452758
1355
1383
  13168189440000
1356
1384
  6469693230
1357
1385
  385
1358
1386
  73.29
1387
+ """
1359
1388
 
1360
- >>> plt = plotting.unary(lambda x: x ** 2, top=10, bottom=0, character="+")
1361
- >>> print(plt)
1362
- >>> print(plotting.binary(lambda x, y: x ** 2 + y ** 2 - 10, right=10, left=0, compare="<=", basic=plotting.change(plt)))
1363
- >>> print(plotting.c_unary(lambda x: x ** x, start=-10, end=10, interval=100, right=2, left=-2, top=2, bottom=-2, complexity=20, character="-"))
1389
+ plt = plotting.unary(lambda x: x ** 2, top=10, bottom=0, character="+")
1390
+ print(plt)
1391
+ print(plotting.binary(lambda x, y: x ** 2 + y ** 2 - 10, right=10, left=0, compare="<=", basic=plotting.change(plt)))
1392
+ print(plotting.c_unary(lambda x: x ** x, right=2, left=-2, top=2, bottom=-2, complexity=20, character="-"))
1364
1393
 
1394
+ """
1365
1395
  1.00e+01| + +
1366
1396
  |
1367
1397
  | + +
@@ -1400,77 +1430,84 @@ print(v1.angles())
1400
1430
  | +++ +++
1401
1431
  0.00e+00|________________________+++________________________
1402
1432
  -5.00e+00 0.00e+00 5.00e+00
1403
- 2.00e+00|
1404
- |
1405
- |
1406
- |
1407
- |
1408
- |
1409
- |
1410
- |
1411
- |
1412
- | -------
1413
- | ------ -----
1414
- | ---- --
1415
- | --- --
1416
- 0.00e+00|_ _ _ _ _ _ _ _ _ _ --_ _ _ _ _ _ _ _ _-- _ _-- _ _ _ ---------------------------
1417
- | -- ------- ---
1418
- | - --
1419
- | - -
1420
- | -- -
1421
- | -- -
1422
- | -- -
1423
- | --- ---
1424
- | ---- ----
1425
- | -------- -------
1426
- | ------------
1427
- |
1428
- |
1429
- |
1430
- -2.00e+00|_________________________________________________________________________________
1433
+ 2.00e+00| - - - - - -
1434
+ | - - - - - - -
1435
+ | - - - - - -
1436
+ |- - - - - - -
1437
+ | - - - - -- - - - -
1438
+ | - - - - - - - - -
1439
+ | - - - - -- - --- -- - -- - - - - -
1440
+ | - - - -- -- - - - -- - - -
1441
+ | - - - - - - - -- - --- --- - - --- -- - -
1442
+ | - - - - - -- ----- -- -- --- -- -- --- -- - -
1443
+ | - - - ------------ ---- - -- -- - --- - - -
1444
+ | - - - - - ----- - -- ----------------------- -- ---- - -- --
1445
+ | - - - - - ---- --------------------------------- - - - - - -
1446
+ 0.00e+00|_ _ _ _ _ _ _ _-_-_-_-_---- ------------------------------------_-- _ _ _ _ _ _ _
1447
+ | - - - - ----------------------------------------- -- - - - -
1448
+ | - -- - - -- - - --------------------------------- - - -
1449
+ | - - ---- - - -- --------------------- ----- ---- - -- -
1450
+ | - - -- --------- -- -- - ----- --- -- - - - -
1451
+ | - - - - - - - ---- --- --- --- -- -- --- - - -
1452
+ | - - - - - -- -- -- - - -- -- --
1453
+ | - - - -- - -- -- - - -- - -
1454
+ | - - - - - - - -- - - -- - -
1455
+ | - - - - -- -- - - - - -
1456
+ | - - - - - - - -
1457
+ |- - - - - - - -
1458
+ | - - - - - -
1459
+ | - - - - -
1460
+ -2.00e+00|___________-_________________-___________-_____________________-____________-____
1431
1461
  -2.00e+00 0.00e+00 2.00e+00
1462
+ """
1432
1463
 
1433
- >>> print(random.gauss(0, 1, [2, 3, 4]))
1434
- >>> print(random.rand([2, 3, 4]))
1435
- >>> print(random.randint(0, 9, [2, 3, 4]))
1436
- >>> print(random.uniform(0, 9, [2, 3, 4]))
1464
+ print(random.gauss(0, 1, [2, 3, 4]))
1465
+ print(random.rand([2, 3, 4]))
1466
+ print(random.randint(0, 9, [2, 3, 4]))
1467
+ print(random.uniform(0, 9, [2, 3, 4]))
1437
1468
 
1438
- [[[1.524086835643172, -0.20868457467847845, 0.5240261503975477, -0.6439838767682032], [-1.091904210196648, -0.20567633973733265, 1.374424576574523, 0.6563097903476932], [0.2171635934136032, 1.0821030876490199, -0.8410496800310051, -0.8321549344577578]], [[0.5306996954571072, -0.4441704154154241, 1.0481960055260355, 0.39805451821848287], [-0.4006858882593715, -0.06238294764009237, -1.1536673264483728, -0.8063185246185602], [0.3029117113345387, -0.32570360518676644, 0.6608320231980702, 1.7415150171137153]]]
1439
- [[[0.3736243541521843, 0.8599079983285199, 0.4260061864869946, 0.8441437619796597], [0.8955986631978392, 0.7570336992646656, 0.6706841989644684, 0.328634366074538], [0.4371430562585502, 0.9576395263025738, 0.2380278778546957, 0.806813631306664]], [[0.18549375381453237, 0.5749941389233029, 0.7009767023241946, 0.30017399397762223], [0.6661914823434657, 0.7802291606608635, 0.6847755352217044, 0.2661053533652564], [0.07937643994416943, 0.5452043474222034, 0.8026792060861194, 0.07776400257578953]]]
1440
- [[[9, 0, 9, 0], [2, 6, 3, 4], [5, 8, 4, 7]], [[7, 7, 6, 3], [5, 5, 5, 8], [3, 4, 6, 6]]]
1441
- [[[5.049093842782947, 1.3880585421884204, 8.533634113864629, 3.550264239771317], [3.3311351975225176, 5.131771033264564, 0.9570872044431911, 5.165536082759862], [1.2035779060925538, 8.292998518472567, 8.014641974770818, 6.251632912237915]], [[6.411677800595937, 5.365937405245105, 8.70943859614565, 4.348757668525482], [7.827612569569748, 1.3718742546020972, 0.5252489627763138, 2.065015517785291], [4.620664668451086, 2.604569735623819, 5.548107842615733, 7.60342292447815]]]
1469
+ """
1470
+ [[[0.4604088962341266, -1.7729143777833498, -1.027113249139529, -1.367335972424437], [1.5152952392963814, 0.1143532276512219, -2.2478367353916626, 0.770010737736378], [-0.4126751204277065, -2.5483288418244814, -0.8493985529797649, -0.5563319772201964]], [[1.9010219123281087, 0.44289739103266357, -0.7148439667426828, -0.742966218100922], [0.21210379525283574, 1.5466635593995341, -0.4536304781981763, 0.5978046752778463], [-0.802299453332161, -1.0295309618075863, 0.5960990076298143, -0.7956578324150254]]]
1471
+ [[[0.6378288221898551, 0.5667742466043126, 0.4656215108828976, 0.15042085420645113], [0.17290475960349394, 0.7286971110875379, 0.645886619551428, 0.6328537921605502], [0.5626377160935252, 0.41015810474249603, 0.9951566294215863, 0.21679108443018347]], [[0.7747392018966252, 0.5885873225687281, 0.4305122635955937, 0.1102178686782671], [0.6823600514076231, 0.919946966200235, 0.9010988477920265, 0.9324975541841414], [0.026520946245817467, 0.7483826867189314, 0.25799134110551736, 0.7231613737350734]]]
1472
+ [[[5, 5, 4, 2], [2, 0, 9, 6], [9, 2, 0, 0]], [[0, 3, 9, 2], [2, 5, 5, 3], [9, 2, 5, 1]]]
1473
+ [[[4.661185893580614, 6.263504213542613, 1.5982048879385133, 4.592524740685044], [5.915777961319595, 0.7073727896327806, 2.6233256174392263, 4.980453415047565], [2.257336580759053, 8.299789041235444, 5.839322602213961, 3.1890466264933925]], [[8.498155134210208, 4.722625882838601, 4.4036516933236705, 4.313235000904077], [3.7418534910533126, 2.7783464437089305, 8.884554145257127, 3.860087039759355], [4.430653527343895, 0.9625175276439548, 6.813933725727357, 7.910773669181097]]]
1474
+ """
1442
1475
 
1443
- >>> print(regression.linear_regression(list(range(5)), [2, 4, 6, 7, 8]))
1444
- >>> print(regression.parabolic_regression(list(range(5)), [2, 4, 6, 7, 8]))
1445
- >>> print(regression.polynomial_regression(list(range(5)), [2, 4, 6, 7, 8], 4))
1476
+ print(regression.linear_regression(list(range(5)), [2, 4, 6, 7, 8]))
1477
+ print(regression.parabolic_regression(list(range(5)), [2, 4, 6, 7, 8]))
1478
+ print(regression.polynomial_regression(list(range(5)), [2, 4, 6, 7, 8], 4))
1446
1479
 
1480
+ """
1447
1481
  [1.5, 2.4000000000000004]
1448
- [-0.21428571428571183, 2.3571428571428474, 1.9714285714285764]
1482
+ [-0.21428571428571563, 2.3571428571428625, 1.971428571428569]
1449
1483
  [0.08333333334800574, -0.6666666668092494, 1.4166666678382942, 1.1666666648311956, 2.0000000002900613]
1484
+ """
1450
1485
 
1451
- >>> print(tools.classify([1, 2.3, 4 + 5j, "string", list, True, 3.14, False, tuple, tools]))
1452
- >>> print(tools.deduplicate(["Python", 6, "NumPy", int, "PyPyNum", 9, "pypynum", "NumPy", 6, True]))
1453
- >>> print(tools.frange(0, 3, 0.4))
1454
- >>> print(tools.linspace(0, 2.8, 8))
1486
+ print(tools.classify([1, 2.3, 4 + 5j, "string", list, True, 3.14, False, tuple, tools]))
1487
+ print(tools.dedup(["Python", 6, "NumPy", int, "PyPyNum", 9, "pypynum", "NumPy", 6, True]))
1488
+ print(tools.frange(0, 3, 0.4))
1489
+ print(tools.linspace(0, 2.8, 8))
1455
1490
 
1491
+ """
1456
1492
  {<class 'int'>: [1], <class 'float'>: [2.3, 3.14], <class 'complex'>: [(4+5j)], <class 'str'>: ['string'], <class 'type'>: [<class 'list'>, <class 'tuple'>], <class 'bool'>: [True, False], <class 'module'>: [<module 'pypynum.tools' from 'F:\\PyPyproject\\PyPyproject1\\pypynum\\tools.py'>]}
1457
1493
  ['Python', 6, 'NumPy', <class 'int'>, 'PyPyNum', 9, 'pypynum', True]
1458
1494
  [0.0, 0.4, 0.8, 1.2000000000000002, 1.6, 2.0, 2.4000000000000004, 2.8000000000000003]
1459
1495
  [0.0, 0.39999999999999997, 0.7999999999999999, 1.2, 1.5999999999999999, 1.9999999999999998, 2.4, 2.8]
1460
-
1461
- 提示:
1462
-
1463
- 测试已成功通过并结束。
1464
-
1465
- 这些测试只是这个包功能的一部分。
1466
-
1467
- 更多的功能需要自己探索和尝试!
1468
-
1469
- Tip:
1470
-
1471
- The test has been successfully passed and ended.
1472
-
1473
- These tests are only part of the functionality of this package.
1474
-
1475
- More features need to be explored and tried by yourself!
1496
+ """
1497
+
1498
+ # 提示:
1499
+ #
1500
+ # 测试已成功通过并结束。
1501
+ #
1502
+ # 这些测试只是这个包功能的一部分。
1503
+ #
1504
+ # 更多的功能需要自己探索和尝试!
1505
+ #
1506
+ # Tip:
1507
+ #
1508
+ # The test has been successfully passed and ended.
1509
+ #
1510
+ # These tests are only part of the functionality of this package.
1511
+ #
1512
+ # More features need to be explored and tried by yourself!
1476
1513
  ```