PyPyNum 1.8.2__tar.gz → 1.9.0__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 (45) hide show
  1. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/PKG-INFO +576 -503
  2. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/PyPyNum.egg-info/PKG-INFO +576 -503
  3. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/Array.py +0 -2
  4. PyPyNum-1.9.0/pypynum/README.md +875 -0
  5. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/Symbolics.py +11 -13
  6. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/__init__.py +2 -2
  7. PyPyNum-1.9.0/pypynum/cipher.py +203 -0
  8. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/constants.py +26 -2
  9. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/errors.py +4 -0
  10. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/maths.py +25 -17
  11. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/probability.py +38 -0
  12. PyPyNum-1.9.0/pypynum/test.py +342 -0
  13. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/this.py +1 -1
  14. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/tools.py +5 -5
  15. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/utils.py +154 -11
  16. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/setup.py +1 -1
  17. PyPyNum-1.8.2/pypynum/README.md +0 -802
  18. PyPyNum-1.8.2/pypynum/cipher.py +0 -23
  19. PyPyNum-1.8.2/pypynum/test.py +0 -294
  20. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/PyPyNum.egg-info/SOURCES.txt +0 -0
  21. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/PyPyNum.egg-info/dependency_links.txt +0 -0
  22. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/PyPyNum.egg-info/top_level.txt +0 -0
  23. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/FourierT.py +0 -0
  24. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/Geometry.py +0 -0
  25. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/Graph.py +0 -0
  26. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/Group.py +0 -0
  27. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/Logic.py +0 -0
  28. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/Matrix.py +0 -0
  29. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/NeuralN.py +0 -0
  30. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/PyPyNum.png +0 -0
  31. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/Quaternion.py +0 -0
  32. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/Tensor.py +0 -0
  33. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/Tree.py +0 -0
  34. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/Vector.py +0 -0
  35. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/chars.py +0 -0
  36. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/equations.py +0 -0
  37. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/file.py +0 -0
  38. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/numbers.py +0 -0
  39. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/plotting.py +0 -0
  40. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/polynomial.py +0 -0
  41. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/random.py +0 -0
  42. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/regression.py +0 -0
  43. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/sequence.py +0 -0
  44. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/pypynum/types.py +0 -0
  45. {PyPyNum-1.8.2 → PyPyNum-1.9.0}/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.0
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.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
 
@@ -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,49 +789,61 @@ Python interpreter and run it!)
742
789
  ```
743
790
  !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
744
791
 
745
- 已确认此库能够向下兼容Python 3.4版本
746
- 以此支持IronPython解释器。
792
+ 新增的代码行数约三百行。
747
793
 
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.
794
+ The number of new code lines is
795
+ about 300.
753
796
 
754
797
  !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
755
798
 
756
- 修改并优化了部分功能。
799
+ 以下函数进行了改名,使用时请注意。
757
800
 
758
- Modified and optimized some
759
- features.
801
+ The following functions have
802
+ been renamed, please be careful
803
+ when using them.
760
804
 
761
- !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
762
805
 
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.
806
+ interpreter -> parse_expr
807
+ deduplicate -> dedup
808
+ interpolation -> interp
778
809
 
779
810
  !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
780
811
 
781
- 使用辛普森公式提高定积分的计算精度。
812
+ “chi2_cont”是卡方检验函数,支持输入一
813
+ 个列联表,返回(chi2,p,dof,
814
+ expected),当自由度为1时可以设置是否
815
+ 经过Yates校正。
782
816
 
783
- Use Simpson's formula to improve
784
- the calculation accuracy of
785
- definite integrals.
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.
786
825
 
787
826
  !=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
827
+
828
+ PyPyNum
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
788
847
  ```
789
848
 
790
849
  ### 运行用时测试
@@ -809,374 +868,343 @@ definite integrals.
809
868
 
810
869
  ```
811
870
  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
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
1163
1190
  ```
1164
1191
 
1165
1192
  ### 代码测试
1166
1193
 
1167
1194
  #### Code testing
1168
1195
 
1169
- ```
1170
- >>> from pypynum import (Array, Geometry, Logic, Matrix, Quaternion, Symbolics, Tensor, Vector,
1171
- 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)
1172
1199
 
1173
1200
  ...
1174
1201
 
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]]]))
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]]]))
1179
1206
 
1207
+ """
1180
1208
  []
1181
1209
  [1 2 3 4 5 6 7 8]
1182
1210
  [[1 2 3 4]
@@ -1186,40 +1214,46 @@ PyPyNum
1186
1214
 
1187
1215
  [[5 6]
1188
1216
  [7 8]]]
1217
+ """
1189
1218
 
1190
- >>> triangle = Geometry.Triangle((0, 0), (2, 2), (3, 0))
1191
- >>> print(triangle.perimeter())
1192
- >>> print(triangle.area())
1193
- >>> 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())
1194
1223
 
1224
+ """
1195
1225
  8.06449510224598
1196
1226
  3.0
1197
1227
  (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
-
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
+ """
1212
1244
  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
-
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
+ """
1223
1257
  [[1 2]
1224
1258
  [3 4]]
1225
1259
  [[5 6]
@@ -1231,40 +1265,46 @@ sum: [1], carry: [1]
1231
1265
  [[-2.0 1.0]
1232
1266
  [ 1.5 -0.5]]
1233
1267
  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
-
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
+ """
1244
1280
  (1+2i+3j+4k)
1245
1281
  (5+6i+7j+8k)
1246
1282
  (6+8i+10j+12k)
1247
1283
  (-60+12i+30j+24k)
1248
1284
  (0.18257418583505536+-0.3651483716701107i+-0.5477225575051661j+-0.7302967433402214k)
1249
1285
  (5+-6i+-7j+-8k)
1286
+ """
1250
1287
 
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"))
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"))
1255
1292
 
1293
+ """
1256
1294
  %()*+-./0123456789
1257
1295
  ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
1258
1296
  ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψω
1259
1297
  [['10', '+', 'a', '-', ['3.14', '+', 'b0'], '*', '-5'], '**', ['-ζn1', '-', '2.718', '/', 'mΣ99'], '//', '9']
1298
+ """
1260
1299
 
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)
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)
1267
1306
 
1307
+ """
1268
1308
  [[[1 2]
1269
1309
  [3 4]]
1270
1310
 
@@ -1285,16 +1325,33 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
1285
1325
 
1286
1326
  [[155 166]
1287
1327
  [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
-
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
+ """
1295
1345
  PyPyNum
1296
- CCCTAGACCCTCGTCCCGCTAAACCCTG
1346
+ ZiZiXew
1297
1347
  PyPyNum
1348
+ PyPyNum
1349
+ RgEfRlo
1350
+ PyPyNum
1351
+ PyPyNum
1352
+ .--. -.-- .--. -.-- -. ..- --
1353
+ PYPYNUM
1354
+ """
1298
1355
 
1299
1356
  v0 = Vector.vec([1, 2, 3, 4])
1300
1357
  v1 = Vector.vec([5, 6, 7, 8])
@@ -1305,29 +1362,33 @@ print(v0 @ v1)
1305
1362
  print(v0.normalize())
1306
1363
  print(v1.angles())
1307
1364
 
1365
+ """
1308
1366
  [1 2 3 4]
1309
1367
  [5 6 7 8]
1310
1368
  [ 5 12 21 32]
1311
1369
  70
1312
1370
  [0.18257418583505536 0.3651483716701107 0.5477225575051661 0.7302967433402214]
1313
1371
  [1.1820279130506308, 1.0985826410133916, 1.0114070854293842, 0.9191723423169716]
1372
+ """
1314
1373
 
1315
- >>> print(constants.TB)
1316
- >>> print(constants.e)
1317
- >>> print(constants.h)
1318
- >>> print(constants.phi)
1319
- >>> print(constants.pi)
1320
- >>> 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)
1321
1380
 
1381
+ """
1322
1382
  1099511627776
1323
1383
  2.718281828459045
1324
1384
  6.62607015e-34
1325
1385
  1.618033988749895
1326
1386
  3.141592653589793
1327
1387
  1000000000000
1388
+ """
1328
1389
 
1329
- >>> p = [1, -2, -3, 4]
1330
- >>> m = [
1390
+ p = [1, -2, -3, 4]
1391
+ m = [
1331
1392
  [
1332
1393
  [1, 2, 3],
1333
1394
  [6, 10, 12],
@@ -1335,33 +1396,38 @@ print(v1.angles())
1335
1396
  ],
1336
1397
  [-1, -2, -3]
1337
1398
  ]
1338
- >>> print(equations.polynomial_equation(p))
1339
- >>> print(equations.linear_equation(*m))
1399
+ print(equations.polynomial_equation(p))
1400
+ print(equations.linear_equation(*m))
1340
1401
 
1402
+ """
1341
1403
  [[(-1.5615528128088307-6.5209667308287455e-24j) 0 0]
1342
1404
  [ 0 (2.5615528128088294+4.456233626665941e-24j) 0]
1343
1405
  [ 0 0 (1.0000000000000007+3.241554513744382e-25j)]]
1344
1406
  [ 1.6666666666666667 -0.6666666666666666 -0.4444444444444444]
1407
+ """
1345
1408
 
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]))
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]))
1352
1415
 
1416
+ """
1353
1417
  0.577350269189626
1354
1418
  0.886226925452758
1355
1419
  13168189440000
1356
1420
  6469693230
1357
1421
  385
1358
1422
  73.29
1423
+ """
1359
1424
 
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="-"))
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="-"))
1364
1429
 
1430
+ """
1365
1431
  1.00e+01| + +
1366
1432
  |
1367
1433
  | + +
@@ -1429,48 +1495,55 @@ print(v1.angles())
1429
1495
  |
1430
1496
  -2.00e+00|_________________________________________________________________________________
1431
1497
  -2.00e+00 0.00e+00 2.00e+00
1498
+ """
1432
1499
 
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]))
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]))
1437
1504
 
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]]]
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
+ """
1442
1511
 
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))
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))
1446
1515
 
1516
+ """
1447
1517
  [1.5, 2.4000000000000004]
1448
1518
  [-0.21428571428571183, 2.3571428571428474, 1.9714285714285764]
1449
1519
  [0.08333333334800574, -0.6666666668092494, 1.4166666678382942, 1.1666666648311956, 2.0000000002900613]
1520
+ """
1450
1521
 
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))
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))
1455
1526
 
1527
+ """
1456
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'>]}
1457
1529
  ['Python', 6, 'NumPy', <class 'int'>, 'PyPyNum', 9, 'pypynum', True]
1458
1530
  [0.0, 0.4, 0.8, 1.2000000000000002, 1.6, 2.0, 2.4000000000000004, 2.8000000000000003]
1459
1531
  [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!
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!
1476
1549
  ```