PyPyNum 1.8.1__py3-none-any.whl → 1.9.0__py3-none-any.whl

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.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyPyNum
3
- Version: 1.8.1
4
- Summary: A multifunctional mathematical calculation package written in pure Python programming language [Python>=3.5]
5
- Home-page: https://www.gitee.com/PythonSJL/PyPyNum
3
+ Version: 1.9.0
4
+ Summary: A multifunctional mathematical calculation package written in pure Python programming language [Python>=3.4]
5
+ Home-page: https://github.com/PythonSJL/PyPyNum
6
6
  Author: Shen Jiayi
7
7
  Author-email: 2261748025@qq.com
8
8
  License:
@@ -669,13 +669,13 @@ License:
669
669
  <http://www.gnu.org/licenses/>.
670
670
 
671
671
  Keywords: math,数学,mathematics,数学计算,numerical,数值,computation,计算,scientific,科学,algebra,代数,calculus,微积分,statistics,统计,linear-algebra,线性代数,optimization,优化,numerical-analysis,数值分析,matrix,矩阵,vector,向量,tensor,张量,numerics,数值计算,library,库,tools,工具,utils,实用程序,algorithms,算法,software,软件,package,包,methods,方法,data-science,数据科学,machine-learning,机器学习,computational,计算的,operations,操作,functions,函数,processing,处理,programming,编程,simulation,仿真,visualization,可视化,physics,物理
672
- Requires-Python: >=3.5
672
+ Requires-Python: >=3.4
673
673
  Description-Content-Type: text/markdown
674
674
 
675
675
  # <font color = blue>PyPyNum</font>
676
676
 
677
677
  <font color = gree>A multifunctional mathematical calculation package written in pure Python programming language
678
- </font><font color = red>[Python>=3.5]</font>
678
+ </font><font color = red>[Python>=3.4]</font>
679
679
 
680
680
  ```
681
681
  ________ ___ ___ ________ ___ ___ ________ ___ ___ _____ ______
@@ -692,24 +692,64 @@ 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.1 | PyPI -> https://pypi.org/project/PyPyNum/ | Gitee -> https://www.gitee.com/PythonSJL/PyPyNum
695
+ ## Version -> 1.9.0 | 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
 
705
705
  #### Introduction
706
706
 
707
- + DIY数学库,类似于numpy、scipy等,专为PyPy解释器制作
708
- + DIY math library, similar to numpy, scipy, etc., specifically designed for PyPy interpreters
707
+ + 多功能数学库,类似于numpy、scipy等,专为PyPy解释器制作,亦支持其他类型的Python解释器
708
+ + Multi functional math library, similar to numpy, scipy, etc., designed specifically for PyPy interpreters and also
709
+ supports other types of Python interpreters
709
710
  + 不定期更新版本,增加更多实用功能
710
711
  + Update versions periodically to add more practical features
711
- + 如需联系,QQ 2261748025 (Py𝙿𝚢𝚝𝚑𝚘𝚗-水晶兰)
712
- + 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 |
713
753
 
714
754
  ### PyPyNum的Zen(预览)
715
755
 
@@ -726,11 +766,19 @@ Straightforwardness is preferred over convolution.
726
766
  Sophisticated is better than overcomplicated.
727
767
  Flat structure beats nested hierarchies.
728
768
  Sparse code wins over bloated ones.
769
+ ```
770
+
771
+ ```
772
+ ...
773
+
774
+ Do you want to view all the content?
729
775
 
730
- ... (Do you want to view all the content?
731
776
  Enter "from pypynum import this" in your
732
- Python interpreter and run it!)
733
777
 
778
+ Python interpreter and run it!
779
+ ```
780
+
781
+ ```
734
782
  February 27, 2024
735
783
  ```
736
784
 
@@ -741,26 +789,61 @@ Python interpreter and run it!)
741
789
  ```
742
790
  !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
743
791
 
744
- eig函数修复了计算错误并改名为eigen
792
+ 新增的代码行数约三百行。
793
+
794
+ The number of new code lines is
795
+ about 300.
796
+
797
+ !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
798
+
799
+ 以下函数进行了改名,使用时请注意。
800
+
801
+ The following functions have
802
+ been renamed, please be careful
803
+ when using them.
804
+
745
805
 
746
- The eig function fixed
747
- calculation errors and changed
748
- its name to eigen
806
+ interpreter -> parse_expr
807
+ deduplicate -> dedup
808
+ interpolation -> interp
749
809
 
750
810
  !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
751
811
 
752
- <<<以下结构中的省略号表示原有的部分>>>
812
+ “chi2_cont”是卡方检验函数,支持输入一
813
+ 个列联表,返回(chi2,p,dof,
814
+ expected),当自由度为1时可以设置是否
815
+ 经过Yates校正。
753
816
 
754
- <<<The ellipsis in the following structure represents the original part>>>
817
+ "chi2_cont" is a chi-square
818
+ test function that supports
819
+ entering a contingency table and
820
+ returning (chi2, p, dof,
821
+ expected). When the degree of
822
+ freedom is 1, you can set
823
+ whether to perform Yates
824
+ correction.
825
+
826
+ !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
755
827
 
756
828
  PyPyNum
757
- Matrix [Matrix calculation]
758
- FUNCTIONS
759
- ...
760
- rotate90(matrix: pypynum.Matrix.Matrix, times: int) -> pypynum.Matrix.Matrix
761
- hessenberg(matrix: pypynum.Matrix.Matrix) -> tuple
762
- eigen(matrix: pypynum.Matrix.Matrix) -> tuple
763
- ...
829
+ ├── cipher
830
+ │ └── FUNCTION
831
+ │ ├── atbash(text: str) -> str
832
+ │ ├── base_64(text: str, decrypt: bool) -> str
833
+ │ ├── caesar(text: str, shift: int, decrypt: bool) -> str
834
+ │ ├── morse(text: str, decrypt: bool) -> str
835
+ │ ├── playfair(text: str, key: str, decrypt: bool) -> str
836
+ │ ├── rot13(text: str) -> str
837
+ │ ├── substitution(text: str, sub_map: dict, decrypt: bool) -> str
838
+ │ └── vigenere(text: str, key: str, decrypt: bool) -> str
839
+ ├── probability
840
+ │ └── FUNCTION
841
+ │ ├── chi2_cont(contingency: list, calc_p: bool, corr: bool) -> tuple
842
+ │ ├── chi2_pdf(x: typing.Union[int, float], k: typing.Union[int, float]) -> float
843
+ └── utils
844
+ ├── CLASS
845
+ │ ├── LinkedList(object)/__init__(self: Any) -> Any
846
+ │ ├── LinkedListNode(object)/__init__(self: Any, value: Any, next_node: Any) -> Any
764
847
  ```
765
848
 
766
849
  ### 运行用时测试
@@ -785,374 +868,343 @@ PyPyNum
785
868
 
786
869
  ```
787
870
  PyPyNum
788
- __init__
789
- [Import some features from other modules in this package]
790
- errors [Special errors]
791
- CLASSES
792
- LogicError
793
- RandomError
794
- ShapeError
795
- file [Reading and saving instance data]
796
- FUNCTIONS
797
- read(file: str) -> list
798
- write(file: str, *cls: object)
799
- test
800
- [A code test file]
801
- this
802
- [The Zen of PyPyNum]
803
- types [Special types]
804
- DATA
805
- arr = typing.Union[list, tuple]
806
- ite = typing.Union[list, tuple, str]
807
- num = typing.Union[int, float, complex]
808
- real = typing.Union[int, float]
809
- Array [N-dimensional array]
810
- CLASSES
811
- Array
812
- FUNCTIONS
813
- array(data=None)
814
- fill(shape, sequence=None)
815
- function(_array, _function, args=None)
816
- get_shape(data)
817
- is_valid_array(_array, _shape)
818
- zeros(shape)
819
- zeros_like(_nested_list)
820
- FourierT [Fourier transform and inverse Fourier transform]
821
- CLASSES
822
- FT1D
823
- Geometry [Planar geometry]
824
- CLASSES
825
- Circle
826
- Line
827
- Point
828
- Polygon
829
- Quadrilateral
830
- Triangle
831
- FUNCTIONS
832
- distance(g1, g2, error: int | float = 0) -> float
833
- Graph [Graph theory]
834
- CLASSES
835
- BaseGraph
836
- BaseWeGraph
837
- WeDiGraph
838
- WeUnGraph
839
- DiGraph
840
- UnGraph
841
- Group [Group theory]
842
- CLASSES
843
- Group
844
- FUNCTIONS
845
- add(x, y)
846
- divide(x, y)
847
- group(data)
848
- multiply(x, y)
849
- subtract(x, y)
850
- Logic [Logic circuit simulation]
851
- CLASSES
852
- Basic
853
- Binary
854
- AND
855
- COMP
856
- HalfAdder
857
- HalfSuber
858
- JKFF
859
- NAND
860
- NOR
861
- OR
862
- XNOR
863
- XOR
864
- Quaternary
865
- TwoBDiver
866
- TwoBMuler
867
- Ternary
868
- FullAdder
869
- FullSuber
870
- Unary
871
- DFF
872
- NOT
873
- TFF
874
- Matrix [Matrix calculation]
875
- CLASSES
876
- Matrix
877
- FUNCTIONS
878
- eigen(matrix: pypynum.Matrix.Matrix) -> tuple
879
- hessenberg(matrix: pypynum.Matrix.Matrix) -> tuple
880
- identity(n: int) -> pypynum.Matrix.Matrix
881
- lu(matrix: pypynum.Matrix.Matrix) -> tuple
882
- mat(data)
883
- qr(matrix: pypynum.Matrix.Matrix) -> tuple
884
- rotate90(matrix: pypynum.Matrix.Matrix, times: int) -> pypynum.Matrix.Matrix
885
- same(rows, cols, value=0)
886
- svd(matrix: pypynum.Matrix.Matrix) -> tuple
887
- tril_indices(n: int, k: int = 0, m: int = None) -> tuple
888
- zeros(_dimensions)
889
- zeros_like(_nested_list)
890
- NeuralN [A simple neural network model]
891
- CLASSES
892
- NeuralNetwork
893
- FUNCTIONS
894
- neuraln(_input, _hidden, _output)
895
- Quaternion [Quaternion calculation]
896
- CLASSES
897
- Euler
898
- Quaternion
899
- FUNCTIONS
900
- change(data: Union[pypynum.Quaternion.Quaternion, pypynum.Matrix.Matrix, pypynum.Quaternion.Euler], to: str) -> Union[pypynum.Quaternion.Quaternion, pypynum.Matrix.Matrix, pypynum.Quaternion.Euler]
901
- euler(yaw: Union[int, float] = 0, pitch: Union[int, float] = 0, roll: Union[int, float] = 0) -> pypynum.Quaternion.Euler
902
- quat(w: Union[int, float] = 0, x: Union[int, float] = 0, y: Union[int, float] = 0, z: Union[int, float] = 0) -> pypynum.Quaternion.Quaternion
903
- Symbolics [Symbol calculation]
904
- FUNCTIONS
905
- interpreter(expr: str) -> list
906
- DATA
907
- basic = "%()*+-./0123456789"
908
- english = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
909
- greek = "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψω"
910
- operators = ["**", "*", "//", "/", "%", "+", "-"]
911
- valid = "%()*+-./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcd...zΑΒΓΔΕΖΗΘΙ...
912
- Tensor [Tensor calculation]
913
- CLASSES
914
- Tensor
915
- FUNCTIONS
916
- ten(data)
917
- tensor_and_number(tensor, operator, number)
918
- tolist(_nested_list)
919
- zeros(_dimensions)
920
- zeros_like(_nested_list)
921
- Tree [Various trees]
922
- CLASSES
923
- MultiTree
924
- MultiTreeNode
925
- Vector [Vector calculation]
926
- CLASSES
927
- Vector
928
- FUNCTIONS
929
- same(length, value=0)
930
- vec(data)
931
- zeros(_dimensions)
932
- zeros_like(_nested_list)
933
- chars [Special mathematical symbols]
934
- DATA
935
- arrow = [["↖", "↑", "↗"], ["←", "⇌", "→"], ["↙", "↓", "↘"], ["↔", "⇋",...
936
- div = "÷"
937
- mul = "×"
938
- others = "¬°‰‱′″∀∂∃∅∆∇∈∉∏∐∑∝∞∟∠∣∥∧∨∩∪∫∬∭∮∯∰∴∵∷∽≈≌≒≠≡≢≤≥≪≫≮≯≰≱≲≳⊕⊙⊥⊿⌒㏑㏒...
939
- overline = "̄"
940
- pi = "Ππ𝜫𝝅𝝥𝝿𝞟𝞹Пп∏ϖ∐ℼㄇ兀"
941
- sgn = "±"
942
- strikethrough = "̶"
943
- subscript = "₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓ"
944
- superscript = "⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴿᵀᵁⱽᵂᵃᵇᶜᵈᵉᶠᵍʰⁱʲᵏˡᵐⁿᵒᵖʳˢᵗᵘᵛ...
945
- tab = [["┌", "┬", "┐"], ["├", "┼", "┤"], ["└", "┴", "┘"], ["─", "╭", "...
946
- underline = "_"
947
- cipher [String encryption and decryption algorithms]
948
- FUNCTIONS
949
- dna(string: str, decrypt: bool = False) -> str
950
- constants [Constants in mathematics and science]
951
- DATA
952
- AMU = 1.6605402e-27
953
- EB = 1152921504606846976
954
- G = 6.6743e-11
955
- GB = 1073741824
956
- KB = 1024
957
- MB = 1048576
958
- NA = 6.02214076e+23
959
- PB = 1125899906842624
960
- TB = 1099511627776
961
- YB = 1208925819614629174706176
962
- ZB = 1180591620717411303424
963
- atto = 1e-18
964
- c = 299792458
965
- centi = 0.01
966
- deci = 0.1
967
- deka = 10
968
- e = 2.718281828459045
969
- exa = 1000000000000000000
970
- femto = 1e-15
971
- gamma = 0.5772156649015329
972
- giga = 1000000000
973
- h = 6.62607015e-34
974
- hecto = 100
975
- inf = inf
976
- kilo = 1000
977
- mega = 1000000
978
- micro = 1e-06
979
- milli = 0.001
980
- nan = nan
981
- nano = 1e-09
982
- peta = 1000000000000000
983
- phi = 1.618033988749895
984
- pi = 3.141592653589793
985
- pico = 1e-12
986
- qe = 1.60217733e-19
987
- tera = 1000000000000
988
- yocto = 1e-24
989
- yotta = 1000000000000000000000000
990
- zepto = 1e-21
991
- zetta = 1000000000000000000000
992
- equations [Solving specific forms of equations]
993
- FUNCTIONS
994
- linear_equation(left: list, right: list) -> list
995
- polynomial_equation(coefficients: list) -> list
996
- maths [Mathematical functions]
997
- FUNCTIONS
998
- root(x: num, y: num) -> num
999
- exp(x: real) -> real
1000
- ln(x: real) -> real
1001
- gcd(*args: int) -> int
1002
- lcm(*args: int) -> int
1003
- sin(x: real) -> real
1004
- cos(x: real) -> real
1005
- tan(x: real) -> real
1006
- csc(x: real) -> real
1007
- sec(x: real) -> real
1008
- cot(x: real) -> real
1009
- asin(x: real) -> real
1010
- acos(x: real) -> real
1011
- atan(x: real) -> real
1012
- acsc(x: real) -> real
1013
- asec(x: real) -> real
1014
- acot(x: real) -> real
1015
- sinh(x: real) -> real
1016
- cosh(x: real) -> real
1017
- tanh(x: real) -> real
1018
- csch(x: real) -> real
1019
- sech(x: real) -> real
1020
- coth(x: real) -> real
1021
- asinh(x: real) -> real
1022
- acosh(x: real) -> real
1023
- atanh(x: real) -> real
1024
- acsch(x: real) -> real
1025
- asech(x: real) -> real
1026
- acoth(x: real) -> real
1027
- ptp(numbers: arr) -> num
1028
- median(numbers: arr) -> num
1029
- freq(data: arr) -> dict
1030
- mode(data: arr)
1031
- mean(numbers: arr) -> num
1032
- geom_mean(numbers: arr) -> num
1033
- square_mean(numbers: arr) -> num
1034
- harm_mean(numbers: arr) -> num
1035
- raw_moment(data: arr, order: int) -> float
1036
- central_moment(data: arr, order: int) -> float
1037
- var(numbers: arr, ddof: int = 0) -> num
1038
- skew(data: arr) -> float
1039
- kurt(data: arr) -> float
1040
- std(numbers: arr, ddof: int = 0) -> num
1041
- cov(x: arr, y: arr, ddof: int = 0) -> num
1042
- corr_coeff(x: arr, y: arr) -> num
1043
- coeff_det(x: arr, y: arr) -> num
1044
- product(numbers: arr) -> num
1045
- sigma(i: int, n: int, f) -> num
1046
- pi(i: int, n: int, f) -> num
1047
- derivative(f, x: real, h: real = 1e-7) -> float
1048
- definite_integral(f, x_start: real, x_end: real, n: int = 10000000) -> float
1049
- beta(p: real, q: real) -> real
1050
- gamma(alpha: real) -> float
1051
- factorial(n: int) -> int
1052
- arrangement(n: int, r: int) -> int
1053
- combination(n: int, r: int) -> int
1054
- zeta(alpha: real) -> float
1055
- gaussian(x: real, _mu: real = 0, _sigma: real = 1) -> float
1056
- poisson(x: int, _lambda: real) -> float
1057
- erf(x: real) -> float
1058
- sigmoid(x: real) -> float
1059
- sign(x: real) -> int
1060
- parity(x: int) -> int
1061
- cumsum(lst: arr) -> list
1062
- cumprod(lst: arr) -> list
1063
- iroot(y: int, n: int) -> int
1064
- totient(n: int) -> int
1065
- mod_order(a: int, n: int, b: int) -> int
1066
- primitive_root(a: int, single: bool = False) -> Union[int, list]
1067
- normalize(data: arr, target: num = 1) -> arr
1068
- average(data, weights, expected=False)
1069
- exgcd(a: int, b: int) -> tuple
1070
- crt(n: arr, a: arr) -> int
1071
- isqrt(x: int) -> int
1072
- is_possibly_square(n: int) -> bool
1073
- is_square(n: int) -> bool
1074
- numbers [Conversion of various numbers]
1075
- FUNCTIONS
1076
- float2fraction(number: float, mixed: bool = False, error: float = 1e-15) -> tuple
1077
- int2roman(integer: int, overline: bool = True) -> str
1078
- roman2int(roman_num: str) -> int
1079
- str2int(string: str) -> int
1080
- DATA
1081
- roman_symbols = ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"]
1082
- roman_values = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
1083
- plotting [Draw a graph of equations using characters]
1084
- FUNCTIONS
1085
- color(text: str, rgb: arr) -> str
1086
- change(data: thing) -> thing
1087
- background(right: real = 5, left: real = -5, top: real = 5, bottom: real = -5...
1088
- unary(function, right: real = 5, left: real = -5, top: real = 5, bottom: real = -5, complexity: real = 5...
1089
- binary(function, right: real = 5, left: real = -5, top: real = 5, bottom: real = -5, complexity: real = 5...
1090
- c_unary(function, start: real, end: real, interval: real = 5, projection: str = "ri", right: real = 5...
1091
- polynomial [Polynomial object]
1092
- CLASSES
1093
- Polynomial
1094
- FUNCTIONS
1095
- poly(terms=None)
1096
- probability [Probability function]
1097
- FUNCTIONS
1098
- binomial(sample_size: int, successes: int, success_probability: Union[int, float]) -> float
1099
- hypergeometric(total_items: int, success_items: int, sample_size: int, successes_in_sample: int) -> float
1100
- random [Generate random numbers or random arrays]
1101
- FUNCTIONS
1102
- choice(seq: Union[list, tuple, str], shape: Union[list, tuple] = None)
1103
- gauss(mu: Union[int, float] = 0, sigma: Union[int, float] = 1, shape: Union[list, tuple] = None) -> Union[float, list]
1104
- gauss_error(original: Union[list, tuple], mu: Union[int, float] = 0, sigma: Union[int, float] = 1) -> list
1105
- rand(shape: Union[list, tuple] = None) -> Union[float, list]
1106
- randint(a: int, b: int, shape: Union[list, tuple] = None) -> Union[int, list]
1107
- uniform(a: Union[int, float], b: Union[int, float], shape: Union[list, tuple] = None) -> Union[float, list]
1108
- ★ regression [Formula based polynomial regression]
1109
- FUNCTIONS
1110
- linear_regression(x: Union[list, tuple], y: Union[list, tuple]) -> list
1111
- parabolic_regression(x: Union[list, tuple], y: Union[list, tuple]) -> list
1112
- polynomial_regression(x: Union[list, tuple], y: Union[list, tuple], n: int = None) -> list
1113
- ★ sequence [Various sequences]
1114
- FUNCTIONS
1115
- farey(n: int) -> list
1116
- fibonacci(n: int, single: bool = True) -> Union[int, list]
1117
- catalan(n: int, single: bool = True) -> Union[int, list]
1118
- bernoulli(n: int, single: bool = True) -> list
1119
- recaman(n: int, single: bool = True) -> Union[int, list]
1120
- arithmetic_sequence(*, a1: real = None, an: real = None, d: real = None, n: real = None, s: real = None) -> dict
1121
- geometric_sequence(*, a1: real = None, an: real = None, r: real = None, n: real = None, s: real = None) -> dict
1122
- ★ tools [Other useful tools]
1123
- FUNCTIONS
1124
- frange(start: real, stop: real, step: float = 1.0) -> list
1125
- linspace(start: real, stop: real, number: int) -> list
1126
- geomspace(start: real, stop: real, number: int) -> list
1127
- deduplicate(iterable: ite) -> ite
1128
- classify(array: arr) -> dict
1129
- split(iterable: ite, key: arr, retain: bool = False) -> list
1130
- interpolation(data: arr, length: int) -> list
1131
- primality(n: int, iter_num: int = 10) -> bool
1132
- generate_primes(limit: int) -> list
1133
- prime_factors(integer: int, dictionary: bool = False, pollard_rho: bool = True) -> Union[list, dict]
1134
- magic_square(n)
1135
- ★ utils [Other useful tools]
1136
- CLASSES
1137
- InfIterator
1138
- OrderedSet
871
+ ├── Array
872
+ │ ├── CLASS
873
+ │ │ └── Array(object)/__init__(self: Any, data: Any, check: Any) -> Any
874
+ │ └── FUNCTION
875
+ │ ├── array(data: Any) -> Any
876
+ │ ├── fill(shape: Any, sequence: Any, repeat: Any) -> Any
877
+ │ ├── function(_array: Any, _function: Any, args: Any) -> Any
878
+ │ ├── get_shape(data: Any) -> Any
879
+ │ ├── is_valid_array(_array: Any, _shape: Any) -> Any
880
+ │ ├── zeros(shape: Any) -> Any
881
+ │ └── zeros_like(_nested_list: Any) -> Any
882
+ ├── FourierT
883
+ │ ├── CLASS
884
+ │ │ └── FT1D(object)/__init__(self: Any, data: Any) -> Any
885
+ │ └── FUNCTION
886
+ ├── Geometry
887
+ │ ├── CLASS
888
+ │ │ ├── Circle(object)/__init__(self: Any, center: typing.Union[list, tuple], radius: typing.Union[int, float]) -> Any
889
+ │ │ ├── Line(object)/__init__(self: Any, a: typing.Union[list, tuple], b: typing.Union[list, tuple]) -> Any
890
+ │ │ ├── Point(object)/__init__(self: Any, p: typing.Union[list, tuple]) -> Any
891
+ │ │ ├── Polygon(object)/__init__(self: Any, p: typing.Union[list, tuple]) -> Any
892
+ │ │ ├── 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
893
+ │ │ └── Triangle(object)/__init__(self: Any, a: typing.Union[list, tuple], b: typing.Union[list, tuple], c: typing.Union[list, tuple]) -> Any
894
+ │ └── FUNCTION
895
+ │ └── distance(g1: Any, g2: Any, error: typing.Union[int, float]) -> float
896
+ ├── Graph
897
+ │ ├── CLASS
898
+ │ │ ├── BaseGraph(object)/__init__(self: Any) -> Any
899
+ │ │ ├── BaseWeGraph(pypynum.Graph.BaseGraph)/__init__(self: Any) -> Any
900
+ │ │ ├── DiGraph(pypynum.Graph.BaseGraph)/__init__(self: Any) -> Any
901
+ │ │ ├── UnGraph(pypynum.Graph.BaseGraph)/__init__(self: Any) -> Any
902
+ │ │ ├── WeDiGraph(pypynum.Graph.BaseWeGraph)/__init__(self: Any) -> Any
903
+ │ │ └── WeUnGraph(pypynum.Graph.BaseWeGraph)/__init__(self: Any) -> Any
904
+ │ └── FUNCTION
905
+ ├── Group
906
+ │ ├── CLASS
907
+ │ │ └── Group(object)/__init__(self: Any, data: Any) -> Any
908
+ │ └── FUNCTION
909
+ │ ├── add(x: Any, y: Any) -> Any
910
+ │ ├── divide(x: Any, y: Any) -> Any
911
+ │ ├── group(data: Any) -> Any
912
+ │ ├── multiply(x: Any, y: Any) -> Any
913
+ │ └── subtract(x: Any, y: Any) -> Any
914
+ ├── Logic
915
+ │ ├── CLASS
916
+ │ │ ├── AND(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
917
+ │ │ ├── Basic(object)/__init__(self: Any, label: Any) -> Any
918
+ │ │ ├── Binary(pypynum.Logic.Basic)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
919
+ │ │ ├── COMP(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
920
+ │ │ ├── DFF(pypynum.Logic.Unary)/__init__(self: Any, label: Any, pin0: Any, state: Any) -> Any
921
+ │ │ ├── FullAdder(pypynum.Logic.Ternary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any) -> Any
922
+ │ │ ├── FullSuber(pypynum.Logic.Ternary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any) -> Any
923
+ │ │ ├── HalfAdder(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
924
+ │ │ ├── HalfSuber(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
925
+ │ │ ├── JKFF(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, state: Any) -> Any
926
+ │ │ ├── NAND(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
927
+ │ │ ├── NOR(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
928
+ │ │ ├── NOT(pypynum.Logic.Unary)/__init__(self: Any, label: Any, pin0: Any) -> Any
929
+ │ │ ├── OR(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
930
+ │ │ ├── Quaternary(pypynum.Logic.Basic)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any, pin3: Any) -> Any
931
+ │ │ ├── TFF(pypynum.Logic.Unary)/__init__(self: Any, label: Any, pin0: Any, state: Any) -> Any
932
+ │ │ ├── Ternary(pypynum.Logic.Basic)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any) -> Any
933
+ │ │ ├── TwoBDiver(pypynum.Logic.Quaternary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any, pin3: Any) -> Any
934
+ │ │ ├── TwoBMuler(pypynum.Logic.Quaternary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any, pin3: Any) -> Any
935
+ │ │ ├── Unary(pypynum.Logic.Basic)/__init__(self: Any, label: Any, pin0: Any) -> Any
936
+ │ │ ├── XNOR(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
937
+ │ │ └── XOR(pypynum.Logic.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
938
+ │ └── FUNCTION
939
+ │ └── connector(previous: Any, latter: Any) -> Any
940
+ ├── Matrix
941
+ │ ├── CLASS
942
+ │ │ └── Matrix(pypynum.Array.Array)/__init__(self: Any, data: Any, check: Any) -> Any
943
+ │ └── FUNCTION
944
+ │ ├── eigen(matrix: pypynum.Matrix.Matrix) -> tuple
945
+ │ ├── hessenberg(matrix: pypynum.Matrix.Matrix) -> tuple
946
+ │ ├── identity(n: int) -> pypynum.Matrix.Matrix
947
+ │ ├── lu(matrix: pypynum.Matrix.Matrix) -> tuple
948
+ │ ├── mat(data: Any) -> Any
949
+ │ ├── qr(matrix: pypynum.Matrix.Matrix) -> tuple
950
+ │ ├── rotate90(matrix: pypynum.Matrix.Matrix, times: int) -> pypynum.Matrix.Matrix
951
+ │ ├── same(rows: Any, cols: Any, value: Any) -> Any
952
+ │ ├── svd(matrix: pypynum.Matrix.Matrix) -> tuple
953
+ │ ├── tril_indices(n: int, k: int, m: int) -> tuple
954
+ │ ├── zeros(_dimensions: Any) -> Any
955
+ │ └── zeros_like(_nested_list: Any) -> Any
956
+ ├── NeuralN
957
+ │ ├── CLASS
958
+ │ │ └── NeuralNetwork(object)/__init__(self: Any, _input: Any, _hidden: Any, _output: Any) -> Any
959
+ │ └── FUNCTION
960
+ │ └── neuraln(_input: Any, _hidden: Any, _output: Any) -> Any
961
+ ├── Quaternion
962
+ │ ├── CLASS
963
+ │ │ ├── Euler(object)/__init__(self: Any, y: typing.Union[int, float], p: typing.Union[int, float], r: typing.Union[int, float]) -> Any
964
+ │ │ └── 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
965
+ │ └── FUNCTION
966
+ │ ├── 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]
967
+ │ ├── euler(yaw: typing.Union[int, float], pitch: typing.Union[int, float], roll: typing.Union[int, float]) -> pypynum.Quaternion.Euler
968
+ │ └── quat(w: typing.Union[int, float], x: typing.Union[int, float], y: typing.Union[int, float], z: typing.Union[int, float]) -> pypynum.Quaternion.Quaternion
969
+ ├── Symbolics
970
+ │ ├── CLASS
971
+ │ └── FUNCTION
972
+ │ └── parse_expr(expr: str) -> list
973
+ ├── Tensor
974
+ │ ├── CLASS
975
+ │ │ └── Tensor(pypynum.Array.Array)/__init__(self: Any, data: Any, check: Any) -> Any
976
+ │ └── FUNCTION
977
+ │ ├── ten(data: list) -> pypynum.Tensor.Tensor
978
+ │ ├── tensor_and_number(tensor: Any, operator: Any, number: Any) -> Any
979
+ │ ├── tensorproduct(tensors: pypynum.Tensor.Tensor) -> pypynum.Tensor.Tensor
980
+ │ ├── zeros(_dimensions: Any) -> Any
981
+ │ └── zeros_like(_nested_list: Any) -> Any
982
+ ├── Tree
983
+ │ ├── CLASS
984
+ │ │ ├── MultiTree(object)/__init__(self: Any, root: Any) -> Any
985
+ │ │ └── MultiTreeNode(object)/__init__(self: Any, data: Any) -> Any
986
+ │ └── FUNCTION
987
+ ├── Vector
988
+ │ ├── CLASS
989
+ │ │ └── Vector(pypynum.Array.Array)/__init__(self: Any, data: Any, check: Any) -> Any
990
+ │ └── FUNCTION
991
+ │ ├── same(length: Any, value: Any) -> Any
992
+ │ ├── vec(data: Any) -> Any
993
+ │ ├── zeros(_dimensions: Any) -> Any
994
+ │ └── zeros_like(_nested_list: Any) -> Any
995
+ ├── chars
996
+ │ ├── CLASS
997
+ │ └── FUNCTION
998
+ ├── cipher
999
+ │ ├── CLASS
1000
+ │ └── FUNCTION
1001
+ │ ├── atbash(text: str) -> str
1002
+ │ ├── base_64(text: str, decrypt: bool) -> str
1003
+ │ ├── caesar(text: str, shift: int, decrypt: bool) -> str
1004
+ │ ├── morse(text: str, decrypt: bool) -> str
1005
+ │ ├── playfair(text: str, key: str, decrypt: bool) -> str
1006
+ │ ├── rot13(text: str) -> str
1007
+ │ ├── substitution(text: str, sub_map: dict, decrypt: bool) -> str
1008
+ │ └── vigenere(text: str, key: str, decrypt: bool) -> str
1009
+ ├── constants
1010
+ │ ├── CLASS
1011
+ │ └── FUNCTION
1012
+ ├── equations
1013
+ │ ├── CLASS
1014
+ │ └── FUNCTION
1015
+ │ ├── linear_equation(left: list, right: list) -> list
1016
+ │ └── polynomial_equation(coefficients: list) -> list
1017
+ ├── errors
1018
+ │ ├── CLASS
1019
+ │ └── FUNCTION
1020
+ ├── file
1021
+ │ ├── CLASS
1022
+ │ └── FUNCTION
1023
+ │ ├── read(file: str) -> list
1024
+ │ └── write(file: str, cls: object) -> Any
1025
+ ├── maths
1026
+ │ ├── CLASS
1027
+ │ └── FUNCTION
1028
+ │ ├── arrangement(n: int, r: int) -> int
1029
+ │ ├── combination(n: int, r: int) -> int
1030
+ │ ├── acos(x: typing.Union[int, float]) -> typing.Union[int, float]
1031
+ │ ├── acosh(x: typing.Union[int, float]) -> typing.Union[int, float]
1032
+ │ ├── acot(x: typing.Union[int, float]) -> typing.Union[int, float]
1033
+ │ ├── acoth(x: typing.Union[int, float]) -> typing.Union[int, float]
1034
+ │ ├── acsc(x: typing.Union[int, float]) -> typing.Union[int, float]
1035
+ │ ├── acsch(x: typing.Union[int, float]) -> typing.Union[int, float]
1036
+ │ ├── arrangement(n: int, r: int) -> int
1037
+ │ ├── asec(x: typing.Union[int, float]) -> typing.Union[int, float]
1038
+ │ ├── asech(x: typing.Union[int, float]) -> typing.Union[int, float]
1039
+ │ ├── asin(x: typing.Union[int, float]) -> typing.Union[int, float]
1040
+ │ ├── asinh(x: typing.Union[int, float]) -> typing.Union[int, float]
1041
+ │ ├── atan(x: typing.Union[int, float]) -> typing.Union[int, float]
1042
+ │ ├── atanh(x: typing.Union[int, float]) -> typing.Union[int, float]
1043
+ │ ├── average(data: Any, weights: Any, expected: Any) -> Any
1044
+ │ ├── beta(p: typing.Union[int, float], q: typing.Union[int, float]) -> typing.Union[int, float]
1045
+ │ ├── central_moment(data: typing.Union[list, tuple], order: int) -> float
1046
+ │ ├── coeff_det(x: typing.Union[list, tuple], y: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1047
+ │ ├── combination(n: int, r: int) -> int
1048
+ │ ├── corr_coeff(x: typing.Union[list, tuple], y: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1049
+ │ ├── cos(x: typing.Union[int, float]) -> typing.Union[int, float]
1050
+ │ ├── cosh(x: typing.Union[int, float]) -> typing.Union[int, float]
1051
+ │ ├── cot(x: typing.Union[int, float]) -> typing.Union[int, float]
1052
+ │ ├── coth(x: typing.Union[int, float]) -> typing.Union[int, float]
1053
+ │ ├── cov(x: typing.Union[list, tuple], y: typing.Union[list, tuple], dof: int) -> typing.Union[int, float, complex]
1054
+ │ ├── crt(n: typing.Union[list, tuple], a: typing.Union[list, tuple]) -> int
1055
+ │ ├── csc(x: typing.Union[int, float]) -> typing.Union[int, float]
1056
+ │ ├── csch(x: typing.Union[int, float]) -> typing.Union[int, float]
1057
+ │ ├── cumprod(lst: typing.Union[list, tuple]) -> list
1058
+ │ ├── cumsum(lst: typing.Union[list, tuple]) -> list
1059
+ │ ├── definite_integral(f: Any, x_start: typing.Union[int, float], x_end: typing.Union[int, float], n: int, args: Any, kwargs: Any) -> float
1060
+ │ ├── derivative(f: Any, x: typing.Union[int, float], h: typing.Union[int, float], args: Any, kwargs: Any) -> float
1061
+ │ ├── erf(x: typing.Union[int, float]) -> float
1062
+ │ ├── exgcd(a: int, b: int) -> tuple
1063
+ │ ├── exp(x: typing.Union[int, float]) -> typing.Union[int, float]
1064
+ │ ├── factorial(n: int) -> int
1065
+ │ ├── freq(data: typing.Union[list, tuple]) -> dict
1066
+ │ ├── gamma(alpha: typing.Union[int, float]) -> float
1067
+ │ ├── gaussian(x: typing.Union[int, float], _mu: typing.Union[int, float], _sigma: typing.Union[int, float]) -> float
1068
+ │ ├── gcd(args: int) -> int
1069
+ │ ├── geom_mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1070
+ │ ├── harm_mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1071
+ │ ├── iroot(y: int, n: int) -> int
1072
+ │ ├── is_possibly_square(n: int) -> bool
1073
+ │ ├── is_square(n: int) -> bool
1074
+ │ ├── isqrt(x: int) -> int
1075
+ │ ├── kurt(data: typing.Union[list, tuple]) -> float
1076
+ │ ├── lcm(args: int) -> int
1077
+ │ ├── ln(x: typing.Union[int, float]) -> typing.Union[int, float]
1078
+ │ ├── mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1079
+ │ ├── median(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1080
+ │ ├── mod_order(a: int, n: int, b: int) -> int
1081
+ │ ├── mode(data: typing.Union[list, tuple]) -> Any
1082
+ │ ├── normalize(data: typing.Union[list, tuple], target: typing.Union[int, float, complex]) -> typing.Union[list, tuple]
1083
+ │ ├── parity(x: int) -> int
1084
+ │ ├── pi(i: int, n: int, f: Any) -> typing.Union[int, float, complex]
1085
+ │ ├── poisson(x: int, _lambda: typing.Union[int, float]) -> float
1086
+ │ ├── primitive_root(a: int, single: bool) -> typing.Union[int, list]
1087
+ │ ├── product(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1088
+ │ ├── ptp(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1089
+ │ ├── raw_moment(data: typing.Union[list, tuple], order: int) -> float
1090
+ │ ├── root(x: typing.Union[int, float, complex], y: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
1091
+ │ ├── sec(x: typing.Union[int, float]) -> typing.Union[int, float]
1092
+ │ ├── sech(x: typing.Union[int, float]) -> typing.Union[int, float]
1093
+ │ ├── sigma(i: int, n: int, f: Any) -> typing.Union[int, float, complex]
1094
+ │ ├── sigmoid(x: typing.Union[int, float]) -> float
1095
+ │ ├── sign(x: typing.Union[int, float]) -> int
1096
+ │ ├── sin(x: typing.Union[int, float]) -> typing.Union[int, float]
1097
+ │ ├── sinh(x: typing.Union[int, float]) -> typing.Union[int, float]
1098
+ │ ├── skew(data: typing.Union[list, tuple]) -> float
1099
+ │ ├── square_mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
1100
+ │ ├── std(numbers: typing.Union[list, tuple], dof: int) -> typing.Union[int, float, complex]
1101
+ │ ├── tan(x: typing.Union[int, float]) -> typing.Union[int, float]
1102
+ │ ├── tanh(x: typing.Union[int, float]) -> typing.Union[int, float]
1103
+ │ ├── totient(n: int) -> int
1104
+ │ ├── var(numbers: typing.Union[list, tuple], dof: int) -> typing.Union[int, float, complex]
1105
+ │ └── zeta(alpha: typing.Union[int, float]) -> float
1106
+ ├── numbers
1107
+ │ ├── CLASS
1108
+ │ └── FUNCTION
1109
+ │ ├── float2fraction(number: float, mixed: bool, error: float) -> tuple
1110
+ │ ├── int2roman(integer: int, overline: bool) -> str
1111
+ │ ├── roman2int(roman_num: str) -> int
1112
+ │ └── str2int(string: str) -> int
1113
+ ├── plotting
1114
+ │ ├── CLASS
1115
+ │ └── FUNCTION
1116
+ │ ├── 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]
1117
+ │ ├── 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]
1118
+ │ ├── c_unary(function: Any, start: typing.Union[int, float], end: typing.Union[int, float], interval: typing.Union[int, float], 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]
1119
+ │ ├── change(data: typing.Union[list, str]) -> typing.Union[list, str]
1120
+ │ ├── color(text: str, rgb: typing.Union[list, tuple]) -> str
1121
+ │ └── 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]
1122
+ ├── polynomial
1123
+ │ ├── CLASS
1124
+ │ │ └── Polynomial(object)/__init__(self: Any, terms: Any) -> Any
1125
+ │ └── FUNCTION
1126
+ │ └── poly(terms: Any) -> Any
1127
+ ├── probability
1128
+ │ ├── CLASS
1129
+ │ └── FUNCTION
1130
+ │ ├── binomial(sample_size: int, successes: int, success_probability: typing.Union[int, float]) -> float
1131
+ │ ├── chi2_cont(contingency: list, calc_p: bool, corr: bool) -> tuple
1132
+ │ ├── chi2_pdf(x: typing.Union[int, float], k: typing.Union[int, float]) -> float
1133
+ │ └── hypergeometric(total_items: int, success_items: int, sample_size: int, successes_in_sample: int) -> float
1134
+ ├── random
1135
+ │ ├── CLASS
1136
+ │ └── FUNCTION
1137
+ │ ├── choice(seq: typing.Union[list, tuple, str], shape: typing.Union[list, tuple]) -> Any
1138
+ │ ├── gauss(mu: typing.Union[int, float], sigma: typing.Union[int, float], shape: typing.Union[list, tuple]) -> typing.Union[float, list]
1139
+ │ ├── gauss_error(original: typing.Union[list, tuple], mu: typing.Union[int, float], sigma: typing.Union[int, float]) -> list
1140
+ │ ├── rand(shape: typing.Union[list, tuple]) -> typing.Union[float, list]
1141
+ │ ├── randint(a: int, b: int, shape: typing.Union[list, tuple]) -> typing.Union[int, list]
1142
+ │ └── uniform(a: typing.Union[int, float], b: typing.Union[int, float], shape: typing.Union[list, tuple]) -> typing.Union[float, list]
1143
+ ├── regression
1144
+ │ ├── CLASS
1145
+ │ └── FUNCTION
1146
+ │ ├── linear_regression(x: typing.Union[list, tuple], y: typing.Union[list, tuple]) -> list
1147
+ │ ├── parabolic_regression(x: typing.Union[list, tuple], y: typing.Union[list, tuple]) -> list
1148
+ │ └── polynomial_regression(x: typing.Union[list, tuple], y: typing.Union[list, tuple], n: int) -> list
1149
+ ├── sequence
1150
+ │ ├── CLASS
1151
+ │ └── FUNCTION
1152
+ │ ├── 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
1153
+ │ ├── bernoulli(n: int, single: bool) -> list
1154
+ │ ├── catalan(n: int, single: bool) -> typing.Union[int, list]
1155
+ │ ├── farey(n: int) -> list
1156
+ │ ├── fibonacci(n: int, single: bool) -> typing.Union[int, list]
1157
+ │ ├── 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
1158
+ │ └── recaman(n: int, single: bool) -> typing.Union[int, list]
1159
+ ├── test
1160
+ │ ├── CLASS
1161
+ │ └── FUNCTION
1162
+ ├── this
1163
+ │ ├── CLASS
1164
+ │ └── FUNCTION
1165
+ ├── tools
1166
+ │ ├── CLASS
1167
+ │ └── FUNCTION
1168
+ │ ├── classify(array: typing.Union[list, tuple]) -> dict
1169
+ │ ├── dedup(iterable: typing.Union[list, tuple, str]) -> typing.Union[list, tuple, str]
1170
+ │ ├── frange(start: typing.Union[int, float], stop: typing.Union[int, float], step: float) -> list
1171
+ │ ├── generate_primes(limit: int) -> list
1172
+ │ ├── generate_semiprimes(limit: int) -> list
1173
+ │ ├── geomspace(start: typing.Union[int, float], stop: typing.Union[int, float], number: int) -> list
1174
+ │ ├── interp(data: typing.Union[list, tuple], length: int) -> list
1175
+ │ ├── linspace(start: typing.Union[int, float], stop: typing.Union[int, float], number: int) -> list
1176
+ │ ├── magic_square(n: Any) -> Any
1177
+ │ ├── primality(n: int, iter_num: int) -> bool
1178
+ │ ├── prime_factors(integer: int, dictionary: bool, pollard_rho: bool) -> typing.Union[list, dict]
1179
+ │ └── split(iterable: typing.Union[list, tuple, str], key: typing.Union[list, tuple], retain: bool) -> list
1180
+ ├── types
1181
+ │ ├── CLASS
1182
+ │ └── FUNCTION
1183
+ └── utils
1184
+ ├── CLASS
1185
+ │ ├── InfIterator(object)/__init__(self: Any, start: typing.Union[int, float, complex], mode: str, common: typing.Union[int, float, complex]) -> Any
1186
+ │ ├── LinkedList(object)/__init__(self: Any) -> Any
1187
+ │ ├── LinkedListNode(object)/__init__(self: Any, value: Any, next_node: Any) -> Any
1188
+ │ └── OrderedSet(object)/__init__(self: Any, sequence: Any) -> Any
1189
+ └── FUNCTION
1139
1190
  ```
1140
1191
 
1141
1192
  ### 代码测试
1142
1193
 
1143
1194
  #### Code testing
1144
1195
 
1145
- ```
1146
- >>> from pypynum import (Array, Geometry, Logic, Matrix, Quaternion, Symbolics, Tensor, Vector,
1147
- cipher, constants, equations, maths, plotting, random, regression, tools)
1196
+ ```python
1197
+ from pypynum import (Array, Geometry, Logic, Matrix, Quaternion, Symbolics, Tensor, Vector,
1198
+ cipher, constants, equations, maths, plotting, random, regression, tools)
1148
1199
 
1149
1200
  ...
1150
1201
 
1151
- >>> print(Array.array())
1152
- >>> print(Array.array([1, 2, 3, 4, 5, 6, 7, 8]))
1153
- >>> print(Array.array([[1, 2, 3, 4], [5, 6, 7, 8]]))
1154
- >>> print(Array.array([[[1, 2], [3, 4]], [[5, 6], [7, 8]]]))
1202
+ print(Array.array())
1203
+ print(Array.array([1, 2, 3, 4, 5, 6, 7, 8]))
1204
+ print(Array.array([[1, 2, 3, 4], [5, 6, 7, 8]]))
1205
+ print(Array.array([[[1, 2], [3, 4]], [[5, 6], [7, 8]]]))
1155
1206
 
1207
+ """
1156
1208
  []
1157
1209
  [1 2 3 4 5 6 7 8]
1158
1210
  [[1 2 3 4]
@@ -1162,40 +1214,46 @@ PyPyNum
1162
1214
 
1163
1215
  [[5 6]
1164
1216
  [7 8]]]
1217
+ """
1165
1218
 
1166
- >>> triangle = Geometry.Triangle((0, 0), (2, 2), (3, 0))
1167
- >>> print(triangle.perimeter())
1168
- >>> print(triangle.area())
1169
- >>> print(triangle.centroid())
1219
+ triangle = Geometry.Triangle((0, 0), (2, 2), (3, 0))
1220
+ print(triangle.perimeter())
1221
+ print(triangle.area())
1222
+ print(triangle.centroid())
1170
1223
 
1224
+ """
1171
1225
  8.06449510224598
1172
1226
  3.0
1173
1227
  (1.6666666666666667, 0.6666666666666666)
1174
-
1175
- >>> a, b, c = 1, 1, 1
1176
- >>> adder0, adder1 = Logic.HalfAdder("alpha", a, b), Logic.HalfAdder("beta", c, None)
1177
- >>> xor0 = Logic.XOR("alpha")
1178
- >>> ff0, ff1 = Logic.DFF("alpha"), Logic.DFF("beta")
1179
- >>> xor0.set_order0(1)
1180
- >>> xor0.set_order1(1)
1181
- >>> Logic.connector(adder0, adder1)
1182
- >>> Logic.connector(adder0, xor0)
1183
- >>> Logic.connector(adder1, xor0)
1184
- >>> Logic.connector(adder1, ff0)
1185
- >>> Logic.connector(xor0, ff1)
1186
- >>> print("sum: {}, carry: {}".format(ff0.out(), ff1.out()))
1187
-
1228
+ """
1229
+
1230
+ a, b, c = 1, 1, 1
1231
+ adder0, adder1 = Logic.HalfAdder("alpha", a, b), Logic.HalfAdder("beta", c, None)
1232
+ xor0 = Logic.XOR("alpha")
1233
+ ff0, ff1 = Logic.DFF("alpha"), Logic.DFF("beta")
1234
+ xor0.set_order0(1)
1235
+ xor0.set_order1(1)
1236
+ Logic.connector(adder0, adder1)
1237
+ Logic.connector(adder0, xor0)
1238
+ Logic.connector(adder1, xor0)
1239
+ Logic.connector(adder1, ff0)
1240
+ Logic.connector(xor0, ff1)
1241
+ print("sum: {}, carry: {}".format(ff0.out(), ff1.out()))
1242
+
1243
+ """
1188
1244
  sum: [1], carry: [1]
1189
-
1190
- >>> m0 = Matrix.mat([[1, 2], [3, 4]])
1191
- >>> m1 = Matrix.mat([[5, 6], [7, 8]])
1192
- >>> print(m0)
1193
- >>> print(m1)
1194
- >>> print(m0 + m1)
1195
- >>> print(m0 @ m1)
1196
- >>> print(m0.inv())
1197
- >>> print(m1.rank())
1198
-
1245
+ """
1246
+
1247
+ m0 = Matrix.mat([[1, 2], [3, 4]])
1248
+ m1 = Matrix.mat([[5, 6], [7, 8]])
1249
+ print(m0)
1250
+ print(m1)
1251
+ print(m0 + m1)
1252
+ print(m0 @ m1)
1253
+ print(m0.inv())
1254
+ print(m1.rank())
1255
+
1256
+ """
1199
1257
  [[1 2]
1200
1258
  [3 4]]
1201
1259
  [[5 6]
@@ -1207,40 +1265,46 @@ sum: [1], carry: [1]
1207
1265
  [[-2.0 1.0]
1208
1266
  [ 1.5 -0.5]]
1209
1267
  2
1210
-
1211
- >>> q0 = Quaternion.quat(1, 2, 3, 4)
1212
- >>> q1 = Quaternion.quat(5, 6, 7, 8)
1213
- >>> print(q0)
1214
- >>> print(q1)
1215
- >>> print(q0 + q1)
1216
- >>> print(q0 * q1)
1217
- >>> print(q0.inverse())
1218
- >>> print(q1.conjugate())
1219
-
1268
+ """
1269
+
1270
+ q0 = Quaternion.quat(1, 2, 3, 4)
1271
+ q1 = Quaternion.quat(5, 6, 7, 8)
1272
+ print(q0)
1273
+ print(q1)
1274
+ print(q0 + q1)
1275
+ print(q0 * q1)
1276
+ print(q0.inverse())
1277
+ print(q1.conjugate())
1278
+
1279
+ """
1220
1280
  (1+2i+3j+4k)
1221
1281
  (5+6i+7j+8k)
1222
1282
  (6+8i+10j+12k)
1223
1283
  (-60+12i+30j+24k)
1224
1284
  (0.18257418583505536+-0.3651483716701107i+-0.5477225575051661j+-0.7302967433402214k)
1225
1285
  (5+-6i+-7j+-8k)
1286
+ """
1226
1287
 
1227
- >>> print(Symbolics.basic)
1228
- >>> print(Symbolics.english)
1229
- >>> print(Symbolics.greek)
1230
- >>> print(Symbolics.interpreter("-(10+a-(3.14+b0)*(-5))**(-ζn1-2.718/mΣ99)//9"))
1288
+ print(Symbolics.BASIC)
1289
+ print(Symbolics.ENGLISH)
1290
+ print(Symbolics.GREEK)
1291
+ print(Symbolics.parse_expr("-(10+a-(3.14+b0)*(-5))**(-ζn1-2.718/mΣ99)//9"))
1231
1292
 
1293
+ """
1232
1294
  %()*+-./0123456789
1233
1295
  ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
1234
1296
  ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψω
1235
1297
  [['10', '+', 'a', '-', ['3.14', '+', 'b0'], '*', '-5'], '**', ['-ζn1', '-', '2.718', '/', 'mΣ99'], '//', '9']
1298
+ """
1236
1299
 
1237
- >>> t0 = Tensor.ten([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])
1238
- >>> t1 = Tensor.ten([[[9, 10], [11, 12]], [[13, 14], [15, 16]]])
1239
- >>> print(t0)
1240
- >>> print(t1)
1241
- >>> print(t0 + t1)
1242
- >>> print(t0 @ t1)
1300
+ t0 = Tensor.ten([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])
1301
+ t1 = Tensor.ten([[[9, 10], [11, 12]], [[13, 14], [15, 16]]])
1302
+ print(t0)
1303
+ print(t1)
1304
+ print(t0 + t1)
1305
+ print(t0 @ t1)
1243
1306
 
1307
+ """
1244
1308
  [[[1 2]
1245
1309
  [3 4]]
1246
1310
 
@@ -1261,16 +1325,33 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
1261
1325
 
1262
1326
  [[155 166]
1263
1327
  [211 226]]]
1264
-
1265
- >>> string = "PyPyNum"
1266
- >>> encrypted = cipher.dna(string)
1267
- >>> print(string)
1268
- >>> print(encrypted)
1269
- >>> print(cipher.dna(encrypted, decrypt=True))
1270
-
1328
+ """
1329
+
1330
+ string = "PyPyNum"
1331
+ encrypted = cipher.caesar(string, 10)
1332
+ print(string)
1333
+ print(encrypted)
1334
+ print(cipher.caesar(encrypted, 10, decrypt=True))
1335
+ encrypted = cipher.vigenere(string, "cipher")
1336
+ print(string)
1337
+ print(encrypted)
1338
+ print(cipher.vigenere(encrypted, "cipher", decrypt=True))
1339
+ encrypted = cipher.morse(string)
1340
+ print(string)
1341
+ print(encrypted)
1342
+ print(cipher.morse(encrypted, decrypt=True))
1343
+
1344
+ """
1345
+ PyPyNum
1346
+ ZiZiXew
1347
+ PyPyNum
1271
1348
  PyPyNum
1272
- CCCTAGACCCTCGTCCCGCTAAACCCTG
1349
+ RgEfRlo
1273
1350
  PyPyNum
1351
+ PyPyNum
1352
+ .--. -.-- .--. -.-- -. ..- --
1353
+ PYPYNUM
1354
+ """
1274
1355
 
1275
1356
  v0 = Vector.vec([1, 2, 3, 4])
1276
1357
  v1 = Vector.vec([5, 6, 7, 8])
@@ -1281,29 +1362,33 @@ print(v0 @ v1)
1281
1362
  print(v0.normalize())
1282
1363
  print(v1.angles())
1283
1364
 
1365
+ """
1284
1366
  [1 2 3 4]
1285
1367
  [5 6 7 8]
1286
1368
  [ 5 12 21 32]
1287
1369
  70
1288
1370
  [0.18257418583505536 0.3651483716701107 0.5477225575051661 0.7302967433402214]
1289
1371
  [1.1820279130506308, 1.0985826410133916, 1.0114070854293842, 0.9191723423169716]
1372
+ """
1290
1373
 
1291
- >>> print(constants.TB)
1292
- >>> print(constants.e)
1293
- >>> print(constants.h)
1294
- >>> print(constants.phi)
1295
- >>> print(constants.pi)
1296
- >>> print(constants.tera)
1374
+ print(constants.TB)
1375
+ print(constants.e)
1376
+ print(constants.h)
1377
+ print(constants.phi)
1378
+ print(constants.pi)
1379
+ print(constants.tera)
1297
1380
 
1381
+ """
1298
1382
  1099511627776
1299
1383
  2.718281828459045
1300
1384
  6.62607015e-34
1301
1385
  1.618033988749895
1302
1386
  3.141592653589793
1303
1387
  1000000000000
1388
+ """
1304
1389
 
1305
- >>> p = [1, -2, -3, 4]
1306
- >>> m = [
1390
+ p = [1, -2, -3, 4]
1391
+ m = [
1307
1392
  [
1308
1393
  [1, 2, 3],
1309
1394
  [6, 10, 12],
@@ -1311,33 +1396,38 @@ print(v1.angles())
1311
1396
  ],
1312
1397
  [-1, -2, -3]
1313
1398
  ]
1314
- >>> print(equations.polynomial_equation(p))
1315
- >>> print(equations.linear_equation(*m))
1399
+ print(equations.polynomial_equation(p))
1400
+ print(equations.linear_equation(*m))
1316
1401
 
1402
+ """
1317
1403
  [[(-1.5615528128088307-6.5209667308287455e-24j) 0 0]
1318
1404
  [ 0 (2.5615528128088294+4.456233626665941e-24j) 0]
1319
1405
  [ 0 0 (1.0000000000000007+3.241554513744382e-25j)]]
1320
1406
  [ 1.6666666666666667 -0.6666666666666666 -0.4444444444444444]
1407
+ """
1321
1408
 
1322
- >>> print(maths.cot(constants.pi / 3))
1323
- >>> print(maths.gamma(1.5))
1324
- >>> print(maths.pi(1, 10, lambda x: x ** 2))
1325
- >>> print(maths.product([2, 3, 5, 7, 11, 13, 17, 19, 23, 29]))
1326
- >>> print(maths.sigma(1, 10, lambda x: x ** 2))
1327
- >>> print(maths.var([2, 3, 5, 7, 11, 13, 17, 19, 23, 29]))
1409
+ print(maths.cot(constants.pi / 3))
1410
+ print(maths.gamma(1.5))
1411
+ print(maths.pi(1, 10, lambda x: x ** 2))
1412
+ print(maths.product([2, 3, 5, 7, 11, 13, 17, 19, 23, 29]))
1413
+ print(maths.sigma(1, 10, lambda x: x ** 2))
1414
+ print(maths.var([2, 3, 5, 7, 11, 13, 17, 19, 23, 29]))
1328
1415
 
1416
+ """
1329
1417
  0.577350269189626
1330
1418
  0.886226925452758
1331
1419
  13168189440000
1332
1420
  6469693230
1333
1421
  385
1334
1422
  73.29
1423
+ """
1335
1424
 
1336
- >>> plt = plotting.unary(lambda x: x ** 2, top=10, bottom=0, character="+")
1337
- >>> print(plt)
1338
- >>> print(plotting.binary(lambda x, y: x ** 2 + y ** 2 - 10, right=10, left=0, compare="<=", basic=plotting.change(plt)))
1339
- >>> 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="-"))
1425
+ plt = plotting.unary(lambda x: x ** 2, top=10, bottom=0, character="+")
1426
+ print(plt)
1427
+ print(plotting.binary(lambda x, y: x ** 2 + y ** 2 - 10, right=10, left=0, compare="<=", basic=plotting.change(plt)))
1428
+ 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="-"))
1340
1429
 
1430
+ """
1341
1431
  1.00e+01| + +
1342
1432
  |
1343
1433
  | + +
@@ -1405,48 +1495,55 @@ print(v1.angles())
1405
1495
  |
1406
1496
  -2.00e+00|_________________________________________________________________________________
1407
1497
  -2.00e+00 0.00e+00 2.00e+00
1498
+ """
1408
1499
 
1409
- >>> print(random.gauss(0, 1, [2, 3, 4]))
1410
- >>> print(random.rand([2, 3, 4]))
1411
- >>> print(random.randint(0, 9, [2, 3, 4]))
1412
- >>> print(random.uniform(0, 9, [2, 3, 4]))
1500
+ print(random.gauss(0, 1, [2, 3, 4]))
1501
+ print(random.rand([2, 3, 4]))
1502
+ print(random.randint(0, 9, [2, 3, 4]))
1503
+ print(random.uniform(0, 9, [2, 3, 4]))
1413
1504
 
1414
- [[[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]]]
1415
- [[[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]]]
1416
- [[[9, 0, 9, 0], [2, 6, 3, 4], [5, 8, 4, 7]], [[7, 7, 6, 3], [5, 5, 5, 8], [3, 4, 6, 6]]]
1417
- [[[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]]]
1505
+ """
1506
+ [[[1.5224810365398622, -0.3957309179046998, 0.22865800022960608, 0.69458992002954], [1.2796914880445907, -0.9963205507196862, -1.035672172661647, 0.6685698624811087], [0.7966036403993993, 1.4728609716690575, 1.4271945372122727, 1.1346636992788732]], [[-1.5167315121066547, 0.5337355746221562, -0.3856209788535444, 0.9933311189027801], [-0.3000451683620412, 1.985371100287406, 1.0044445415210081, -0.160547602340231], [-1.4024800661532726, -0.2943388293424122, 0.39426575084974064, -0.1788920335787877]]]
1507
+ [[[0.5832734051570118, 0.12709072960713108, 0.8460371711928255, 0.7732502834495745], [0.1337174418330055, 0.20214133151753821, 0.11501155244785399, 0.945090241309287], [0.784115524194132, 0.5008953798117651, 0.3514598489060844, 0.2730882163660271]], [[0.8536525608965406, 0.03101021951426164, 0.8904423549934418, 0.30844019778976395], [0.6686071112680847, 0.8622569244011669, 0.5624751157425253, 0.25138337174684133], [0.28360470724085995, 0.31597491199666694, 0.8115190344839784, 0.2685895801115009]]]
1508
+ [[[7, 1, 2, 5], [0, 7, 9, 9], [3, 0, 5, 6]], [[2, 2, 4, 3], [9, 7, 2, 0], [2, 5, 6, 6]]]
1509
+ [[[3.2674331705558304, 8.794845124593792, 8.48281482952606, 4.071439810303413], [3.525937325174985, 8.353244015747865, 5.167113956700689, 8.200558536323298], [0.5729366698493622, 4.49113422389227, 7.736245315815029, 1.9082811620380302]], [[4.889120931109369, 1.6037956737307013, 7.983047897048623, 1.3817112552960102], [5.866208284533167, 0.5963242816793028, 6.17792540726971, 8.415093555918986], [0.2560629015262261, 1.9094767046602064, 5.647362624435581, 4.042400239970636]]]
1510
+ """
1418
1511
 
1419
- >>> print(regression.linear_regression(list(range(5)), [2, 4, 6, 7, 8]))
1420
- >>> print(regression.parabolic_regression(list(range(5)), [2, 4, 6, 7, 8]))
1421
- >>> print(regression.polynomial_regression(list(range(5)), [2, 4, 6, 7, 8], 4))
1512
+ print(regression.linear_regression(list(range(5)), [2, 4, 6, 7, 8]))
1513
+ print(regression.parabolic_regression(list(range(5)), [2, 4, 6, 7, 8]))
1514
+ print(regression.polynomial_regression(list(range(5)), [2, 4, 6, 7, 8], 4))
1422
1515
 
1516
+ """
1423
1517
  [1.5, 2.4000000000000004]
1424
1518
  [-0.21428571428571183, 2.3571428571428474, 1.9714285714285764]
1425
1519
  [0.08333333334800574, -0.6666666668092494, 1.4166666678382942, 1.1666666648311956, 2.0000000002900613]
1520
+ """
1426
1521
 
1427
- >>> print(tools.classify([1, 2.3, 4 + 5j, "string", list, True, 3.14, False, tuple, tools]))
1428
- >>> print(tools.deduplicate(["Python", 6, "NumPy", int, "PyPyNum", 9, "pypynum", "NumPy", 6, True]))
1429
- >>> print(tools.frange(0, 3, 0.4))
1430
- >>> print(tools.linspace(0, 2.8, 8))
1522
+ print(tools.classify([1, 2.3, 4 + 5j, "string", list, True, 3.14, False, tuple, tools]))
1523
+ print(tools.dedup(["Python", 6, "NumPy", int, "PyPyNum", 9, "pypynum", "NumPy", 6, True]))
1524
+ print(tools.frange(0, 3, 0.4))
1525
+ print(tools.linspace(0, 2.8, 8))
1431
1526
 
1527
+ """
1432
1528
  {<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'>]}
1433
1529
  ['Python', 6, 'NumPy', <class 'int'>, 'PyPyNum', 9, 'pypynum', True]
1434
1530
  [0.0, 0.4, 0.8, 1.2000000000000002, 1.6, 2.0, 2.4000000000000004, 2.8000000000000003]
1435
1531
  [0.0, 0.39999999999999997, 0.7999999999999999, 1.2, 1.5999999999999999, 1.9999999999999998, 2.4, 2.8]
1436
-
1437
- 提示:
1438
-
1439
- 测试已成功通过并结束。
1440
-
1441
- 这些测试只是这个包功能的一部分。
1442
-
1443
- 更多的功能需要自己探索和尝试!
1444
-
1445
- Tip:
1446
-
1447
- The test has been successfully passed and ended.
1448
-
1449
- These tests are only part of the functionality of this package.
1450
-
1451
- More features need to be explored and tried by yourself!
1532
+ """
1533
+
1534
+ # 提示:
1535
+ #
1536
+ # 测试已成功通过并结束。
1537
+ #
1538
+ # 这些测试只是这个包功能的一部分。
1539
+ #
1540
+ # 更多的功能需要自己探索和尝试!
1541
+ #
1542
+ # Tip:
1543
+ #
1544
+ # The test has been successfully passed and ended.
1545
+ #
1546
+ # These tests are only part of the functionality of this package.
1547
+ #
1548
+ # More features need to be explored and tried by yourself!
1452
1549
  ```