PyPyNum 1.5.0__tar.gz → 1.5.2__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.
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/PKG-INFO +82 -81
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/PyPyNum.egg-info/PKG-INFO +82 -81
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/Matrix.py +2 -4
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/README.md +80 -79
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/__init__.py +1 -1
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/maths.py +144 -9
- PyPyNum-1.5.2/pypynum/sequence.py +175 -0
- PyPyNum-1.5.2/pypynum/this.py +9 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/tools.py +39 -1
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/setup.py +2 -2
- PyPyNum-1.5.0/pypynum/sequence.py +0 -49
- PyPyNum-1.5.0/pypynum/this.py +0 -9
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/PyPyNum.egg-info/SOURCES.txt +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/PyPyNum.egg-info/dependency_links.txt +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/PyPyNum.egg-info/top_level.txt +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/Array.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/FourierT.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/Geometry.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/Group.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/Logic.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/NeuralN.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/PyPyNum.png +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/Quaternion.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/Symbolics.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/Tensor.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/Vector.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/__temporary.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/cipher.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/constants.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/equations.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/errors.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/file.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/plotting.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/probability.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/random.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/regression.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/test.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/pypynum/types.py +0 -0
- {PyPyNum-1.5.0 → PyPyNum-1.5.2}/setup.cfg +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyPyNum
|
|
3
|
-
Version: 1.5.
|
|
4
|
-
Summary: A
|
|
3
|
+
Version: 1.5.2
|
|
4
|
+
Summary: A multifunctional mathematical calculation package written in pure Python programming language [Python>=3.5]
|
|
5
5
|
Home-page: https://www.gitee.com/PythonSJL/PyPyNum
|
|
6
6
|
Author: Shen Jiayi
|
|
7
7
|
Author-email: 2261748025@qq.com
|
|
@@ -673,8 +673,8 @@ Description-Content-Type: text/markdown
|
|
|
673
673
|
|
|
674
674
|
# <font color = blue>PyPyNum</font>
|
|
675
675
|
|
|
676
|
-
<font color = gree>A Python math package written in pure Python programming language</font
|
|
677
|
-
python_requires >= 3.5)</font>
|
|
676
|
+
<font color = gree>A Python math package written in pure Python programming language</font><font color = red>
|
|
677
|
+
(python_requires >= 3.5)</font>
|
|
678
678
|
|
|
679
679
|
```
|
|
680
680
|
________ ___ ___ ________ ___ ___ ________ ___ ___ _____ ______
|
|
@@ -687,10 +687,14 @@ python_requires >= 3.5)</font>
|
|
|
687
687
|
\|___|/ \|___|/
|
|
688
688
|
```
|
|
689
689
|
|
|
690
|
-
## Version -> 1.5.
|
|
690
|
+
## Version -> 1.5.2 | PyPI -> https://pypi.org/project/PyPyNum/ | Gitee -> https://www.gitee.com/PythonSJL/PyPyNum
|
|
691
691
|
|
|
692
692
|

|
|
693
693
|
|
|
694
|
+
PyPI上无法显示logo,可以在Gitee中查看。
|
|
695
|
+
|
|
696
|
+
The logo cannot be displayed on PyPI, it can be viewed in Gitee.
|
|
697
|
+
|
|
694
698
|
### 介绍
|
|
695
699
|
|
|
696
700
|
#### Introduction
|
|
@@ -702,20 +706,27 @@ python_requires >= 3.5)</font>
|
|
|
702
706
|
+ 如需联系,QQ 2261748025 (Py𝙿𝚢𝚝𝚑𝚘𝚗-水晶兰)
|
|
703
707
|
+ If you need to contact, QQ 2261748025 (Py𝙿𝚢𝚝𝚑𝚘𝚗-水晶兰)
|
|
704
708
|
|
|
705
|
-
### PyPyNum的Zen
|
|
709
|
+
### PyPyNum的Zen(预览)
|
|
706
710
|
|
|
707
|
-
#### The Zen of PyPyNum
|
|
711
|
+
#### The Zen of PyPyNum (Preview)
|
|
708
712
|
|
|
709
713
|
```
|
|
710
714
|
The Zen of PyPyNum, by Shen Jiayi
|
|
711
715
|
|
|
712
716
|
This is a math package written purely in Python.
|
|
713
717
|
|
|
714
|
-
|
|
715
|
-
|
|
718
|
+
Elegant is superior to clunky.
|
|
719
|
+
Clarity trumps obscurity.
|
|
720
|
+
Straightforwardness is preferred over convolution.
|
|
721
|
+
Sophisticated is better than overcomplicated.
|
|
722
|
+
Flat structure beats nested hierarchies.
|
|
723
|
+
Sparse code wins over bloated ones.
|
|
724
|
+
|
|
725
|
+
... (Do you want to view all the content?
|
|
726
|
+
Enter "from pypynum import this" in your
|
|
716
727
|
Python interpreter and run it!)
|
|
717
728
|
|
|
718
|
-
|
|
729
|
+
February 27, 2024
|
|
719
730
|
```
|
|
720
731
|
|
|
721
732
|
### 与上一个版本相比新增功能
|
|
@@ -725,88 +736,69 @@ Python interpreter and run it!)
|
|
|
725
736
|
```
|
|
726
737
|
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
727
738
|
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
739
|
+
重写了PyPyNum的Zen。
|
|
740
|
+
|
|
741
|
+
Rewrote the Zen of PyPyNum.
|
|
742
|
+
|
|
743
|
+
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
744
|
+
|
|
745
|
+
“maths”模块的一些功能已经进行了优化,
|
|
746
|
+
以实现更快的运行速度。
|
|
747
|
+
|
|
748
|
+
Some functions of the "maths"
|
|
749
|
+
module have been optimized to
|
|
750
|
+
achieve faster running speed.
|
|
733
751
|
|
|
734
752
|
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
735
753
|
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
positive integer power of 2
|
|
754
|
+
修复了“tools”模块中的“split”函数导致
|
|
755
|
+
的字符串分割错误。
|
|
756
|
+
|
|
757
|
+
Fixed string splitting error
|
|
758
|
+
caused by the "split" function
|
|
759
|
+
in the "tools" module.
|
|
743
760
|
|
|
744
761
|
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
745
762
|
|
|
746
|
-
“
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
function
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
763
|
+
“sequence”模块设置为每个序列返回单独
|
|
764
|
+
的第n项或包含第0到第n项的列表的功能。
|
|
765
|
+
|
|
766
|
+
The "sequence" module sets the
|
|
767
|
+
function of returning a separate
|
|
768
|
+
nth item or a list containing
|
|
769
|
+
0th to nth items for each
|
|
770
|
+
sequence.
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
“geometric_sequence”函数补充了一个
|
|
774
|
+
情况的求解函数,并且已经证实,其余两个情
|
|
775
|
+
况没有解析解,需要使用多项式方程来求解。
|
|
776
|
+
|
|
777
|
+
The "geometric_sequence"
|
|
778
|
+
function supplements the solving
|
|
779
|
+
function for one scenario, and
|
|
780
|
+
it has been confirmed that there
|
|
781
|
+
are no analytical solutions for
|
|
782
|
+
the remaining two scenarios,
|
|
783
|
+
which need to be solved using
|
|
784
|
+
polynomial equations for
|
|
785
|
+
implementation.
|
|
767
786
|
|
|
768
787
|
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
769
788
|
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
[This is the base class of vectors, matrices, and tensors]
|
|
773
|
-
|
|
774
|
-
Array(data=None, check=True)
|
|
775
|
-
__add__(self, other)
|
|
776
|
-
__eq__(self, other)
|
|
777
|
-
__getitem__(self, item)
|
|
778
|
-
__hash__(self)
|
|
779
|
-
__init__(self, data=None, check=True)
|
|
780
|
-
__ne__(self, other)
|
|
781
|
-
__radd__(self, other)
|
|
782
|
-
__repr__(self)
|
|
783
|
-
__round__(self, n=None)
|
|
784
|
-
__str__(self)
|
|
785
|
-
argmax(self, axis=None) +
|
|
786
|
-
argmin(self, axis=None) +
|
|
787
|
-
basic(self, func, axis=None) +
|
|
788
|
-
copy(self)
|
|
789
|
-
flatten(self)
|
|
790
|
-
max(self, axis=None) +
|
|
791
|
-
mean(self, axis=None) +
|
|
792
|
-
median(self, axis=None) +
|
|
793
|
-
min(self, axis=None) +
|
|
794
|
-
mode(self, axis=None) +
|
|
795
|
-
product(self, axis=None) +
|
|
796
|
-
ptp(self, axis=None) +
|
|
797
|
-
reshape(self, shape)
|
|
798
|
-
std(self, axis=None) +
|
|
799
|
-
sum(self, axis=None) +
|
|
800
|
-
var(self, axis=None) +
|
|
789
|
+
<<<The "+" indicates the newly added method>>>
|
|
801
790
|
|
|
802
791
|
maths [Mathematical functions]
|
|
803
|
-
root(x: num, y: num) -> num +
|
|
804
792
|
...
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
793
|
+
geom_mean(numbers: arr) -> num +
|
|
794
|
+
square_mean(numbers: arr) -> num +
|
|
795
|
+
harm_mean(numbers: arr) -> num +
|
|
796
|
+
...
|
|
808
797
|
|
|
809
|
-
|
|
798
|
+
sequence [Various sequences]
|
|
799
|
+
...
|
|
800
|
+
recaman(n: int, single: bool = True) -> Union[int, list] +
|
|
801
|
+
...
|
|
810
802
|
```
|
|
811
803
|
|
|
812
804
|
### 运行用时测试
|
|
@@ -1047,8 +1039,14 @@ PyPyNum
|
|
|
1047
1039
|
freq(data: arr) -> dict
|
|
1048
1040
|
mode(data: arr)
|
|
1049
1041
|
mean(numbers: arr) -> num
|
|
1042
|
+
geom_mean(numbers: arr) -> num
|
|
1043
|
+
square_mean(numbers: arr) -> num
|
|
1044
|
+
harm_mean(numbers: arr) -> num
|
|
1050
1045
|
var(numbers: arr) -> num
|
|
1051
1046
|
std(numbers: arr) -> num
|
|
1047
|
+
cov(x: arr, y: arr) -> num
|
|
1048
|
+
corr_coeff(x: arr, y: arr) -> num
|
|
1049
|
+
coeff_det(x: arr, y: arr) -> num
|
|
1052
1050
|
product(numbers: arr) -> num
|
|
1053
1051
|
sigma(i: int, n: int, f) -> num
|
|
1054
1052
|
pi(i: int, n: int, f) -> num
|
|
@@ -1096,9 +1094,12 @@ PyPyNum
|
|
|
1096
1094
|
polynomial_regression(x: Union[list, tuple], y: Union[list, tuple], n: int = None) -> list
|
|
1097
1095
|
★ sequence [Various sequences]
|
|
1098
1096
|
FUNCTIONS
|
|
1097
|
+
fibonacci(n: int, single: bool = True) -> Union[int, list]
|
|
1098
|
+
catalan(n: int, single: bool = True) -> Union[int, list]
|
|
1099
1099
|
bernoulli(n: int, single: bool = True) -> list
|
|
1100
|
-
|
|
1101
|
-
|
|
1100
|
+
recaman(n: int, single: bool = True) -> Union[int, list]
|
|
1101
|
+
arithmetic_sequence(*, a1: real = None, an: real = None, d: real = None, n: real = None, s: real = None) -> dict
|
|
1102
|
+
geometric_sequence(*, a1: real = None, an: real = None, r: real = None, n: real = None, s: real = None) -> dict
|
|
1102
1103
|
★ tools [Other useful tools]
|
|
1103
1104
|
FUNCTIONS
|
|
1104
1105
|
classify(array: Union[list, tuple]) -> dict
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyPyNum
|
|
3
|
-
Version: 1.5.
|
|
4
|
-
Summary: A
|
|
3
|
+
Version: 1.5.2
|
|
4
|
+
Summary: A multifunctional mathematical calculation package written in pure Python programming language [Python>=3.5]
|
|
5
5
|
Home-page: https://www.gitee.com/PythonSJL/PyPyNum
|
|
6
6
|
Author: Shen Jiayi
|
|
7
7
|
Author-email: 2261748025@qq.com
|
|
@@ -673,8 +673,8 @@ Description-Content-Type: text/markdown
|
|
|
673
673
|
|
|
674
674
|
# <font color = blue>PyPyNum</font>
|
|
675
675
|
|
|
676
|
-
<font color = gree>A Python math package written in pure Python programming language</font
|
|
677
|
-
python_requires >= 3.5)</font>
|
|
676
|
+
<font color = gree>A Python math package written in pure Python programming language</font><font color = red>
|
|
677
|
+
(python_requires >= 3.5)</font>
|
|
678
678
|
|
|
679
679
|
```
|
|
680
680
|
________ ___ ___ ________ ___ ___ ________ ___ ___ _____ ______
|
|
@@ -687,10 +687,14 @@ python_requires >= 3.5)</font>
|
|
|
687
687
|
\|___|/ \|___|/
|
|
688
688
|
```
|
|
689
689
|
|
|
690
|
-
## Version -> 1.5.
|
|
690
|
+
## Version -> 1.5.2 | PyPI -> https://pypi.org/project/PyPyNum/ | Gitee -> https://www.gitee.com/PythonSJL/PyPyNum
|
|
691
691
|
|
|
692
692
|

|
|
693
693
|
|
|
694
|
+
PyPI上无法显示logo,可以在Gitee中查看。
|
|
695
|
+
|
|
696
|
+
The logo cannot be displayed on PyPI, it can be viewed in Gitee.
|
|
697
|
+
|
|
694
698
|
### 介绍
|
|
695
699
|
|
|
696
700
|
#### Introduction
|
|
@@ -702,20 +706,27 @@ python_requires >= 3.5)</font>
|
|
|
702
706
|
+ 如需联系,QQ 2261748025 (Py𝙿𝚢𝚝𝚑𝚘𝚗-水晶兰)
|
|
703
707
|
+ If you need to contact, QQ 2261748025 (Py𝙿𝚢𝚝𝚑𝚘𝚗-水晶兰)
|
|
704
708
|
|
|
705
|
-
### PyPyNum的Zen
|
|
709
|
+
### PyPyNum的Zen(预览)
|
|
706
710
|
|
|
707
|
-
#### The Zen of PyPyNum
|
|
711
|
+
#### The Zen of PyPyNum (Preview)
|
|
708
712
|
|
|
709
713
|
```
|
|
710
714
|
The Zen of PyPyNum, by Shen Jiayi
|
|
711
715
|
|
|
712
716
|
This is a math package written purely in Python.
|
|
713
717
|
|
|
714
|
-
|
|
715
|
-
|
|
718
|
+
Elegant is superior to clunky.
|
|
719
|
+
Clarity trumps obscurity.
|
|
720
|
+
Straightforwardness is preferred over convolution.
|
|
721
|
+
Sophisticated is better than overcomplicated.
|
|
722
|
+
Flat structure beats nested hierarchies.
|
|
723
|
+
Sparse code wins over bloated ones.
|
|
724
|
+
|
|
725
|
+
... (Do you want to view all the content?
|
|
726
|
+
Enter "from pypynum import this" in your
|
|
716
727
|
Python interpreter and run it!)
|
|
717
728
|
|
|
718
|
-
|
|
729
|
+
February 27, 2024
|
|
719
730
|
```
|
|
720
731
|
|
|
721
732
|
### 与上一个版本相比新增功能
|
|
@@ -725,88 +736,69 @@ Python interpreter and run it!)
|
|
|
725
736
|
```
|
|
726
737
|
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
727
738
|
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
739
|
+
重写了PyPyNum的Zen。
|
|
740
|
+
|
|
741
|
+
Rewrote the Zen of PyPyNum.
|
|
742
|
+
|
|
743
|
+
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
744
|
+
|
|
745
|
+
“maths”模块的一些功能已经进行了优化,
|
|
746
|
+
以实现更快的运行速度。
|
|
747
|
+
|
|
748
|
+
Some functions of the "maths"
|
|
749
|
+
module have been optimized to
|
|
750
|
+
achieve faster running speed.
|
|
733
751
|
|
|
734
752
|
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
735
753
|
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
positive integer power of 2
|
|
754
|
+
修复了“tools”模块中的“split”函数导致
|
|
755
|
+
的字符串分割错误。
|
|
756
|
+
|
|
757
|
+
Fixed string splitting error
|
|
758
|
+
caused by the "split" function
|
|
759
|
+
in the "tools" module.
|
|
743
760
|
|
|
744
761
|
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
745
762
|
|
|
746
|
-
“
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
function
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
763
|
+
“sequence”模块设置为每个序列返回单独
|
|
764
|
+
的第n项或包含第0到第n项的列表的功能。
|
|
765
|
+
|
|
766
|
+
The "sequence" module sets the
|
|
767
|
+
function of returning a separate
|
|
768
|
+
nth item or a list containing
|
|
769
|
+
0th to nth items for each
|
|
770
|
+
sequence.
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
“geometric_sequence”函数补充了一个
|
|
774
|
+
情况的求解函数,并且已经证实,其余两个情
|
|
775
|
+
况没有解析解,需要使用多项式方程来求解。
|
|
776
|
+
|
|
777
|
+
The "geometric_sequence"
|
|
778
|
+
function supplements the solving
|
|
779
|
+
function for one scenario, and
|
|
780
|
+
it has been confirmed that there
|
|
781
|
+
are no analytical solutions for
|
|
782
|
+
the remaining two scenarios,
|
|
783
|
+
which need to be solved using
|
|
784
|
+
polynomial equations for
|
|
785
|
+
implementation.
|
|
767
786
|
|
|
768
787
|
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
769
788
|
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
[This is the base class of vectors, matrices, and tensors]
|
|
773
|
-
|
|
774
|
-
Array(data=None, check=True)
|
|
775
|
-
__add__(self, other)
|
|
776
|
-
__eq__(self, other)
|
|
777
|
-
__getitem__(self, item)
|
|
778
|
-
__hash__(self)
|
|
779
|
-
__init__(self, data=None, check=True)
|
|
780
|
-
__ne__(self, other)
|
|
781
|
-
__radd__(self, other)
|
|
782
|
-
__repr__(self)
|
|
783
|
-
__round__(self, n=None)
|
|
784
|
-
__str__(self)
|
|
785
|
-
argmax(self, axis=None) +
|
|
786
|
-
argmin(self, axis=None) +
|
|
787
|
-
basic(self, func, axis=None) +
|
|
788
|
-
copy(self)
|
|
789
|
-
flatten(self)
|
|
790
|
-
max(self, axis=None) +
|
|
791
|
-
mean(self, axis=None) +
|
|
792
|
-
median(self, axis=None) +
|
|
793
|
-
min(self, axis=None) +
|
|
794
|
-
mode(self, axis=None) +
|
|
795
|
-
product(self, axis=None) +
|
|
796
|
-
ptp(self, axis=None) +
|
|
797
|
-
reshape(self, shape)
|
|
798
|
-
std(self, axis=None) +
|
|
799
|
-
sum(self, axis=None) +
|
|
800
|
-
var(self, axis=None) +
|
|
789
|
+
<<<The "+" indicates the newly added method>>>
|
|
801
790
|
|
|
802
791
|
maths [Mathematical functions]
|
|
803
|
-
root(x: num, y: num) -> num +
|
|
804
792
|
...
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
793
|
+
geom_mean(numbers: arr) -> num +
|
|
794
|
+
square_mean(numbers: arr) -> num +
|
|
795
|
+
harm_mean(numbers: arr) -> num +
|
|
796
|
+
...
|
|
808
797
|
|
|
809
|
-
|
|
798
|
+
sequence [Various sequences]
|
|
799
|
+
...
|
|
800
|
+
recaman(n: int, single: bool = True) -> Union[int, list] +
|
|
801
|
+
...
|
|
810
802
|
```
|
|
811
803
|
|
|
812
804
|
### 运行用时测试
|
|
@@ -1047,8 +1039,14 @@ PyPyNum
|
|
|
1047
1039
|
freq(data: arr) -> dict
|
|
1048
1040
|
mode(data: arr)
|
|
1049
1041
|
mean(numbers: arr) -> num
|
|
1042
|
+
geom_mean(numbers: arr) -> num
|
|
1043
|
+
square_mean(numbers: arr) -> num
|
|
1044
|
+
harm_mean(numbers: arr) -> num
|
|
1050
1045
|
var(numbers: arr) -> num
|
|
1051
1046
|
std(numbers: arr) -> num
|
|
1047
|
+
cov(x: arr, y: arr) -> num
|
|
1048
|
+
corr_coeff(x: arr, y: arr) -> num
|
|
1049
|
+
coeff_det(x: arr, y: arr) -> num
|
|
1052
1050
|
product(numbers: arr) -> num
|
|
1053
1051
|
sigma(i: int, n: int, f) -> num
|
|
1054
1052
|
pi(i: int, n: int, f) -> num
|
|
@@ -1096,9 +1094,12 @@ PyPyNum
|
|
|
1096
1094
|
polynomial_regression(x: Union[list, tuple], y: Union[list, tuple], n: int = None) -> list
|
|
1097
1095
|
★ sequence [Various sequences]
|
|
1098
1096
|
FUNCTIONS
|
|
1097
|
+
fibonacci(n: int, single: bool = True) -> Union[int, list]
|
|
1098
|
+
catalan(n: int, single: bool = True) -> Union[int, list]
|
|
1099
1099
|
bernoulli(n: int, single: bool = True) -> list
|
|
1100
|
-
|
|
1101
|
-
|
|
1100
|
+
recaman(n: int, single: bool = True) -> Union[int, list]
|
|
1101
|
+
arithmetic_sequence(*, a1: real = None, an: real = None, d: real = None, n: real = None, s: real = None) -> dict
|
|
1102
|
+
geometric_sequence(*, a1: real = None, an: real = None, r: real = None, n: real = None, s: real = None) -> dict
|
|
1102
1103
|
★ tools [Other useful tools]
|
|
1103
1104
|
FUNCTIONS
|
|
1104
1105
|
classify(array: Union[list, tuple]) -> dict
|
|
@@ -168,10 +168,8 @@ class Matrix(Array):
|
|
|
168
168
|
if len(item) == 2:
|
|
169
169
|
if isinstance(item[0], int) and isinstance(item[1], (int, slice)):
|
|
170
170
|
return self.data[item[0]][item[1]]
|
|
171
|
-
elif isinstance(item[0], slice) and isinstance(item[1], int):
|
|
172
|
-
return
|
|
173
|
-
elif isinstance(item[0], slice) and isinstance(item[1], slice):
|
|
174
|
-
return Matrix(Matrix(self.data[item[0]]).t().data[item[1]]).t()
|
|
171
|
+
elif isinstance(item[0], slice) and isinstance(item[1], (int, slice)):
|
|
172
|
+
return [row[item[1]] for row in self.data[item[0]]]
|
|
175
173
|
else:
|
|
176
174
|
return []
|
|
177
175
|
else:
|