PyPyNum 1.16.0__py3-none-any.whl → 1.16.2__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.
- {PyPyNum-1.16.0.dist-info → PyPyNum-1.16.2.dist-info}/METADATA +93 -80
- {PyPyNum-1.16.0.dist-info → PyPyNum-1.16.2.dist-info}/RECORD +17 -17
- pypynum/README.md +92 -79
- pypynum/__init__.py +1 -1
- pypynum/arrays.py +92 -34
- pypynum/chars.py +10 -1
- pypynum/dists.py +2 -2
- pypynum/maths.py +11 -11
- pypynum/multiprec.py +2 -2
- pypynum/seqs.py +2 -1
- pypynum/special.py +277 -3
- pypynum/tensors.py +3 -15
- pypynum/tools.py +182 -1
- pypynum/vectors.py +47 -38
- pypynum/zh_cn.py +6 -6
- {PyPyNum-1.16.0.dist-info → PyPyNum-1.16.2.dist-info}/WHEEL +0 -0
- {PyPyNum-1.16.0.dist-info → PyPyNum-1.16.2.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyPyNum
|
|
3
|
-
Version: 1.16.
|
|
3
|
+
Version: 1.16.2
|
|
4
4
|
Summary: PyPyNum is a Python library for math & science computations, covering algebra, calculus, stats, with data structures like matrices, vectors, tensors. It offers numerical tools, programs, and supports computational ops, functions, processing, simulation, & visualization in data science & ML, crucial for research, engineering, & data processing.
|
|
5
5
|
Home-page: https://github.com/PythonSJL/PyPyNum
|
|
6
6
|
Author: Shen Jiayi
|
|
@@ -234,7 +234,7 @@ processing.</font><font color = red>[Python>=3.4]</font>
|
|
|
234
234
|
[](https://pepy.tech/project/pypynum)
|
|
235
235
|
[](https://pepy.tech/project/pypynum)
|
|
236
236
|
|
|
237
|
-
## Version -> 1.16.
|
|
237
|
+
## Version -> 1.16.2 | PyPI -> https://pypi.org/project/PyPyNum/ | Gitee -> https://www.gitee.com/PythonSJL/PyPyNum | GitHub -> https://github.com/PythonSJL/PyPyNum
|
|
238
238
|
|
|
239
239
|

|
|
240
240
|
|
|
@@ -247,6 +247,15 @@ The logo cannot be displayed on PyPI, it can be viewed in Gitee or GitHub.
|
|
|
247
247
|
+ Update versions periodically to add more practical features
|
|
248
248
|
+ If you need to contact, please add QQ number 2261748025 (Py𝙿𝚢𝚝𝚑𝚘𝚗-水晶兰), or through my email 2261748025@qq.com
|
|
249
249
|
|
|
250
|
+
```
|
|
251
|
+
+++++++++++++++++++++++++++++++++++++++++
|
|
252
|
+
+ Tip: +
|
|
253
|
+
+ Have suggestions or feature requests? +
|
|
254
|
+
+ Feel free to share them with us. +
|
|
255
|
+
+ Your feedback is highly appreciated! +
|
|
256
|
+
+++++++++++++++++++++++++++++++++++++++++
|
|
257
|
+
```
|
|
258
|
+
|
|
250
259
|
### Name and Function Introduction of Submodules
|
|
251
260
|
|
|
252
261
|
| Submodule Name | Function Introduction |
|
|
@@ -327,81 +336,69 @@ Python interpreter and run it!
|
|
|
327
336
|
```
|
|
328
337
|
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
329
338
|
|
|
330
|
-
|
|
331
|
-
a large number of mathematical
|
|
332
|
-
and scientific constants,
|
|
333
|
-
currently totaling 128.
|
|
339
|
+
<<< Here are the newly added functions >>>
|
|
334
340
|
|
|
335
|
-
This module defines a collection
|
|
336
|
-
of constants representing
|
|
337
|
-
various physical, mathematical,
|
|
338
|
-
and unit conversion factors.
|
|
339
341
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
342
|
+
kmp_table(pattern: Union[list, tuple, str]) -> list
|
|
343
|
+
Introduction
|
|
344
|
+
==========
|
|
345
|
+
Generate the KMP (Knuth-Morris-Pratt) table for a given pattern.
|
|
343
346
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
execute 'help(consts)' to
|
|
347
|
-
obtain it.
|
|
347
|
+
The KMP table is used to efficiently find occurrences of a pattern within a sequence by avoiding unnecessary
|
|
348
|
+
comparisons after a mismatch. This table determines how many characters can be skipped after a mismatch.
|
|
348
349
|
|
|
349
|
-
|
|
350
|
+
Example
|
|
351
|
+
========
|
|
352
|
+
>>> kmp_table("AGCTGATCGTACGTAAGCTAGCTA")
|
|
353
|
+
[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 2, 3, 4, 1, 2, 3, 4, 1]
|
|
354
|
+
>>>
|
|
355
|
+
:param pattern: The pattern for which to generate the KMP table.
|
|
356
|
+
:return: A list representing the KMP table for the given pattern.
|
|
350
357
|
|
|
351
358
|
|
|
352
|
-
|
|
359
|
+
findall(seq: Union[list, tuple, str], pat: Union[list, tuple, str]) -> list
|
|
360
|
+
Introduction
|
|
361
|
+
==========
|
|
362
|
+
Find all indices of the subsequence 'pat' in 'seq'.
|
|
353
363
|
|
|
364
|
+
This function is designed to handle sequences such as lists, tuples, or strings and find all indices
|
|
365
|
+
of specified subsequences. It allows overlapping matches.
|
|
354
366
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
│ │ # Calculate the q-gamma function of n with parameter q.
|
|
364
|
-
│ └── qpochhammer(a: typing.Union[int, float, complex], q: typing.Union[int, float, complex], n: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
365
|
-
│ # Compute the q-Pochhammer symbol for given a, q, and n.
|
|
366
|
-
├── multiprec
|
|
367
|
-
│ └── FUNCTION
|
|
368
|
-
│ ├── mp_catalan(sigfigs: int) -> decimal.Decimal
|
|
369
|
-
│ # Calculate the Catalan's constant with a specified number of significant figures using multiprecision arithmetic.
|
|
370
|
-
├── seqs
|
|
371
|
-
│ └── FUNCTION
|
|
372
|
-
│ ├── padovan(n: int, single: bool) -> typing.Union[int, list]
|
|
373
|
-
│ │ # Generate the Padovan sequence up to the nth term.
|
|
374
|
-
│ ├── pelllucas(n: int, single: bool) -> typing.Union[int, list]
|
|
375
|
-
│ │ # Generate the Pell-Lucas sequence up to the nth term.
|
|
376
|
-
│ ├── perrin(n: int, single: bool) -> typing.Union[int, list]
|
|
377
|
-
│ │ # Generate the Perrin sequence up to the nth term.
|
|
378
|
-
│ └── sylvester(n: int, single: bool) -> typing.Union[int, list]
|
|
379
|
-
│ # Generate the Sylvester sequence up to the nth term.
|
|
380
|
-
├── tools
|
|
381
|
-
│ └── FUNCTION
|
|
382
|
-
│ ├── lcsubseq(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> list
|
|
383
|
-
│ │ # Find the longest common subsequence between two sequences x and y.
|
|
384
|
-
│ └── lcsubstr(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> list
|
|
385
|
-
│ # Find the longest common substring between two sequences x and y.
|
|
386
|
-
├── matrices
|
|
387
|
-
│ ├── CLASS
|
|
388
|
-
│ │ └── Matrix(pypynum.arrays.Array)/__init__(self: Any, data: Any, check: Any) -> Any
|
|
389
|
-
│ │ # Initialize a Matrix object from a given data array.
|
|
390
|
-
│ └── FUNCTION
|
|
391
|
-
│ ├── perm_mat(num_rows: int, num_cols: int, row_swaps: typing.Union[list, tuple], col_swaps: typing.Union[list, tuple], rtype: typing.Callable) -> typing.Any
|
|
392
|
-
│ │ # Create a permutation matrix based on specified row and column swaps.
|
|
393
|
-
│ └── perm_mat_indices(num_rows: int, num_cols: int, row_swaps: typing.Union[list, tuple], col_swaps: typing.Union[list, tuple]) -> tuple
|
|
394
|
-
│ # Compute the indices for a permutation matrix based on specified row and column swaps.
|
|
367
|
+
Example
|
|
368
|
+
========
|
|
369
|
+
>>> findall([2, 1, 2, 1, 2, 1, 2, 1], [1, 2, 1, 2])
|
|
370
|
+
[1, 3]
|
|
371
|
+
>>>
|
|
372
|
+
:param seq: The sequence in which to find the subsequence.
|
|
373
|
+
:param pat: The subsequence to be found.
|
|
374
|
+
:return: A list of starting indices where the subsequence is found.
|
|
395
375
|
|
|
396
376
|
|
|
397
|
-
|
|
377
|
+
---------------------------------------------------------------------------------------
|
|
378
|
+
| q-functions generalize classical math functions by introducing parameter q. |
|
|
379
|
+
| They are key in combinatorics and special functions, widely applied. |
|
|
380
|
+
| As q approaches 1, they revert to classical forms. |
|
|
381
|
+
| Examples include q-factorials, q-binomial coefficients, Jackson q-Bessel functions. |
|
|
382
|
+
| These functions are crucial in fractals, chaotic systems, quantum groups. |
|
|
383
|
+
| They provide tools for solving complex mathematical challenges effectively. |
|
|
384
|
+
---------------------------------------------------------------------------------------
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
Here are the 12 new q-functions added in the current version (adding the previous 4 makes a total of 16):
|
|
388
|
+
|
|
398
389
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
390
|
+
qbeta(a: Union[int, float, complex], b: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
391
|
+
qcos_large(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
392
|
+
qcos_small(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
393
|
+
qcosh_large(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
394
|
+
qcosh_small(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
395
|
+
qexp_large(z: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
396
|
+
qexp_small(z: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
397
|
+
qpi(q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
398
|
+
qsin_large(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
399
|
+
qsin_small(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
400
|
+
qsinh_large(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
401
|
+
qsinh_small(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
405
402
|
|
|
406
403
|
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
407
404
|
```
|
|
@@ -439,15 +436,16 @@ PyPyNum
|
|
|
439
436
|
│ ├── asarray(data: Any) -> Any
|
|
440
437
|
│ ├── aslist(data: Any) -> Any
|
|
441
438
|
│ ├── boolarray(data: Any) -> Any
|
|
442
|
-
│ ├── fill(shape:
|
|
443
|
-
│ ├── full(shape:
|
|
444
|
-
│ ├── full_like(a: Any, fill_value: Any, rtype:
|
|
439
|
+
│ ├── fill(shape: typing.Union[list, tuple], sequence: typing.Union[list, tuple], repeat: bool, pad: typing.Any, rtype: typing.Callable) -> typing.Any
|
|
440
|
+
│ ├── full(shape: typing.Union[list, tuple], fill_value: typing.Any, rtype: typing.Callable) -> typing.Any
|
|
441
|
+
│ ├── full_like(a: typing.Any, fill_value: typing.Any, rtype: typing.Callable) -> typing.Any
|
|
445
442
|
│ ├── get_shape(data: Any) -> Any
|
|
446
443
|
│ ├── is_valid_array(_array: Any, _shape: Any) -> Any
|
|
447
|
-
│ ├── ones(shape:
|
|
448
|
-
│ ├── ones_like(a: Any, rtype:
|
|
449
|
-
│ ├──
|
|
450
|
-
│
|
|
444
|
+
│ ├── ones(shape: typing.Union[list, tuple], rtype: typing.Callable) -> typing.Any
|
|
445
|
+
│ ├── ones_like(a: typing.Any, rtype: typing.Callable) -> typing.Any
|
|
446
|
+
│ ├── tensorproduct(tensors: pypynum.arrays.Array) -> pypynum.arrays.Array
|
|
447
|
+
│ ├── zeros(shape: typing.Union[list, tuple], rtype: typing.Callable) -> typing.Any
|
|
448
|
+
│ └── zeros_like(a: typing.Any, rtype: typing.Callable) -> typing.Any
|
|
451
449
|
├── chars
|
|
452
450
|
│ ├── CLASS
|
|
453
451
|
│ └── FUNCTION
|
|
@@ -501,7 +499,7 @@ PyPyNum
|
|
|
501
499
|
│ ├── gamma_pdf(x: Any, shape: Any, scale: Any) -> Any
|
|
502
500
|
│ ├── geometric_pmf(k: Any, p: Any) -> Any
|
|
503
501
|
│ ├── hypergeom_pmf(k: Any, mg: Any, n: Any, nt: Any) -> Any
|
|
504
|
-
│ ├──
|
|
502
|
+
│ ├── invgauss_pdf(x: Any, mu: Any, lambda_: Any, alpha: Any) -> Any
|
|
505
503
|
│ ├── levy_pdf(x: Any, c: Any) -> Any
|
|
506
504
|
│ ├── log_logistic_cdf(x: Any, alpha: Any, beta: Any) -> Any
|
|
507
505
|
│ ├── log_logistic_pdf(x: Any, alpha: Any, beta: Any) -> Any
|
|
@@ -647,7 +645,7 @@ PyPyNum
|
|
|
647
645
|
│ ├── cosh(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
648
646
|
│ ├── cot(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
649
647
|
│ ├── coth(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
650
|
-
│ ├── cov(x: typing.Union[list, tuple], y: typing.Union[list, tuple],
|
|
648
|
+
│ ├── cov(x: typing.Union[list, tuple], y: typing.Union[list, tuple], ddof: int) -> typing.Union[int, float, complex]
|
|
651
649
|
│ ├── crt(n: typing.Union[list, tuple], a: typing.Union[list, tuple]) -> int
|
|
652
650
|
│ ├── csc(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
653
651
|
│ ├── csch(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
@@ -695,13 +693,13 @@ PyPyNum
|
|
|
695
693
|
│ ├── sinh(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
696
694
|
│ ├── skew(data: typing.Union[list, tuple]) -> float
|
|
697
695
|
│ ├── square_mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
|
|
698
|
-
│ ├── std(numbers: typing.Union[list, tuple],
|
|
696
|
+
│ ├── std(numbers: typing.Union[list, tuple], ddof: int) -> typing.Union[int, float, complex]
|
|
699
697
|
│ ├── sumprod(arrays: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
|
|
700
698
|
│ ├── tan(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
701
699
|
│ ├── tanh(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
702
700
|
│ ├── totient(n: int) -> int
|
|
703
701
|
│ ├── upper_gamma(s: typing.Union[int, float, complex], x: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
704
|
-
│ ├── var(numbers: typing.Union[list, tuple],
|
|
702
|
+
│ ├── var(numbers: typing.Union[list, tuple], ddof: int) -> typing.Union[int, float, complex]
|
|
705
703
|
│ ├── xlogy(x: typing.Union[int, float, complex], y: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
706
704
|
│ └── zeta(alpha: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
707
705
|
├── matrices
|
|
@@ -848,10 +846,22 @@ PyPyNum
|
|
|
848
846
|
│ ├── hyp1f1(a0: typing.Union[int, float, complex], b0: typing.Union[int, float, complex], z: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
849
847
|
│ ├── hyp2f1(a0: typing.Union[int, float, complex], a1: typing.Union[int, float, complex], b0: typing.Union[int, float, complex], z: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
850
848
|
│ ├── hyppfq(a: typing.Union[list, tuple], b: typing.Union[list, tuple], z: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
849
|
+
│ ├── qbeta(a: typing.Union[int, float, complex], b: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
851
850
|
│ ├── qbinomial(n: typing.Union[int, float, complex], m: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
851
|
+
│ ├── qcos_large(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
852
|
+
│ ├── qcos_small(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
853
|
+
│ ├── qcosh_large(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
854
|
+
│ ├── qcosh_small(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
855
|
+
│ ├── qexp_large(z: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
856
|
+
│ ├── qexp_small(z: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
852
857
|
│ ├── qfactorial(n: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
853
858
|
│ ├── qgamma(n: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
854
|
-
│
|
|
859
|
+
│ ├── qpi(q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
860
|
+
│ ├── qpochhammer(a: typing.Union[int, float, complex], q: typing.Union[int, float, complex], n: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
861
|
+
│ ├── qsin_large(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
862
|
+
│ ├── qsin_small(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
863
|
+
│ ├── qsinh_large(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
864
|
+
│ └── qsinh_small(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
855
865
|
├── stattest
|
|
856
866
|
│ ├── CLASS
|
|
857
867
|
│ └── FUNCTION
|
|
@@ -870,8 +880,7 @@ PyPyNum
|
|
|
870
880
|
│ │ └── Tensor(pypynum.arrays.Array)/__init__(self: Any, data: Any, check: Any) -> Any
|
|
871
881
|
│ └── FUNCTION
|
|
872
882
|
│ ├── ten(data: list) -> pypynum.tensors.Tensor
|
|
873
|
-
│
|
|
874
|
-
│ └── tensorproduct(tensors: pypynum.tensors.Tensor) -> pypynum.tensors.Tensor
|
|
883
|
+
│ └── tensor_and_number(tensor: Any, operator: Any, number: Any) -> Any
|
|
875
884
|
├── test
|
|
876
885
|
│ ├── CLASS
|
|
877
886
|
│ └── FUNCTION
|
|
@@ -882,10 +891,13 @@ PyPyNum
|
|
|
882
891
|
│ ├── CLASS
|
|
883
892
|
│ └── FUNCTION
|
|
884
893
|
│ ├── classify(array: typing.Union[list, tuple]) -> dict
|
|
894
|
+
│ ├── cos_sim(seq1: typing.Union[list, tuple, str], seq2: typing.Union[list, tuple, str], is_vector: bool) -> float
|
|
885
895
|
│ ├── dedup(iterable: typing.Union[list, tuple, str]) -> typing.Union[list, tuple, str]
|
|
886
896
|
│ ├── fast_pow(a: typing.Any, n: int, init: typing.Any, mul: typing.Callable) -> typing.Any
|
|
897
|
+
│ ├── findall(seq: typing.Union[list, tuple, str], pat: typing.Union[list, tuple, str]) -> list
|
|
887
898
|
│ ├── frange(start: typing.Union[int, float], stop: typing.Union[int, float], step: float) -> list
|
|
888
899
|
│ ├── geomspace(start: typing.Union[int, float], stop: typing.Union[int, float], number: int) -> list
|
|
900
|
+
│ ├── kmp_table(pattern: typing.Union[list, tuple, str]) -> list
|
|
889
901
|
│ ├── lcsubseq(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> list
|
|
890
902
|
│ ├── lcsubstr(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> list
|
|
891
903
|
│ ├── levenshtein(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> int
|
|
@@ -894,6 +906,7 @@ PyPyNum
|
|
|
894
906
|
│ ├── primality(n: int, iter_num: int) -> bool
|
|
895
907
|
│ ├── prime_factors(integer: int, dictionary: bool, pollard_rho: bool) -> typing.Union[list, dict]
|
|
896
908
|
│ ├── primes(limit: int) -> list
|
|
909
|
+
│ ├── replace(seq: typing.Union[list, tuple], old: typing.Union[list, tuple], new: typing.Union[list, tuple], count: int) -> typing.Union[list, tuple]
|
|
897
910
|
│ ├── semiprimes(limit: int) -> list
|
|
898
911
|
│ ├── split(iterable: typing.Union[list, tuple, str], key: typing.Union[list, tuple], retain: bool) -> list
|
|
899
912
|
│ └── twinprimes(limit: int) -> list
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
pypynum/PyPyNum.png,sha256=t96tJPWfHxT8kcXm_qZI2z5W36TgOqjCU9qdgbmlFws,11623
|
|
2
|
-
pypynum/README.md,sha256=
|
|
3
|
-
pypynum/__init__.py,sha256=
|
|
4
|
-
pypynum/arrays.py,sha256=
|
|
5
|
-
pypynum/chars.py,sha256=
|
|
2
|
+
pypynum/README.md,sha256=RQ25LQM5-mWR-7bvwgUn2TzuklWLomSeDABoL0QeN2A,87008
|
|
3
|
+
pypynum/__init__.py,sha256=BqVO2tFYX-UWMao6Uy1Zl8snL6H2_GxNM6Chestl02Q,2640
|
|
4
|
+
pypynum/arrays.py,sha256=81dlyUn1xNs1f4enpfQjXEJurjEMfQqaQMfMC3quR8U,15793
|
|
5
|
+
pypynum/chars.py,sha256=HIqTmWl58GypJgVIlgSFVc2icI01NczfbRyu5QmuHz0,2178
|
|
6
6
|
pypynum/ciphers.py,sha256=kC7wZk3FF-MCCvn2-1YxiaRa4ImDKxyyihJYc6Dyf5E,10008
|
|
7
7
|
pypynum/consts.py,sha256=enetPwJevWgYXuGEasAb-tXMHpvL2xWKUe-B1gTwInk,8416
|
|
8
8
|
pypynum/crandom.py,sha256=44GZ7o6y5PwgL-cZLkXUZaAUfiW6aadyRNfMdxTnH30,5111
|
|
9
9
|
pypynum/dataproc.py,sha256=bJ2a1-S7TQj8V8vzXZ3ooP32fBe99NQU0orPGprEIdg,9231
|
|
10
|
-
pypynum/dists.py,sha256=
|
|
10
|
+
pypynum/dists.py,sha256=fz7hZZfHFWDHnxo7Li9eNkaj7cQtE6SuYGaitSRwHKc,29695
|
|
11
11
|
pypynum/equations.py,sha256=_oywKzbrOPOOhD4yu83qqNiIOKQPbJJs6SghdkGbqUw,561
|
|
12
12
|
pypynum/fft.py,sha256=AtG0tESykzEs4gDsXhcizW7qhQnmw0gjcWcXefBqzhs,1401
|
|
13
13
|
pypynum/files.py,sha256=iLtTc5UTtUUWoh2sDJl5Yyy_rT8-Vi0pby5c2J95EqE,3397
|
|
@@ -18,9 +18,9 @@ pypynum/images.py,sha256=DPpsW_qdoKSrXz3w6DWaQDj9Y_u5l_JYWbNt47taJbs,12157
|
|
|
18
18
|
pypynum/interp.py,sha256=wNMa6M_IRpSe026tuRxXfr244oBtgHOpCpYlGd4eyhA,4920
|
|
19
19
|
pypynum/kernels.py,sha256=GMwWnjLWEprFXSEAIN8d6GZrC2KDx6qhJdbcLBoYOTg,15869
|
|
20
20
|
pypynum/logics.py,sha256=EwvWFNND14__oWx7o-_oYIUubmVhp3DrvBcnRCWW8vc,10999
|
|
21
|
-
pypynum/maths.py,sha256=
|
|
21
|
+
pypynum/maths.py,sha256=Q8TX1o3j5g-0VKS2kHiaxMKkvWXa20vGi1jhIuaJsXw,32820
|
|
22
22
|
pypynum/matrices.py,sha256=useh4_Hlk3YBRTSTJK6SsErTRnDVblsqB0a7iw1mB_k,22439
|
|
23
|
-
pypynum/multiprec.py,sha256=
|
|
23
|
+
pypynum/multiprec.py,sha256=LCaj0pkZIXmPKodm2Jt5RdyTg20Q6Js-n7PGBzqMXhk,20111
|
|
24
24
|
pypynum/networks.py,sha256=iSOvC9JW1h4AFGokGGOTkKie5hAYN_YT9H4f3apI9b8,3275
|
|
25
25
|
pypynum/numbers.py,sha256=EPzw8zq5U7GQj8URu2VxeVIXS-_XQm2ADmSAIHa816k,11133
|
|
26
26
|
pypynum/plotting.py,sha256=mbIYK5TpY1qvuMJrqz4d8bxJEiZww3AI684vSKV-DgU,7781
|
|
@@ -29,21 +29,21 @@ pypynum/pprinters.py,sha256=Qt9-V5SUyoOqC3lsUU5D5zSSM-MmcnFCUyUtLxhS4pE,2514
|
|
|
29
29
|
pypynum/quats.py,sha256=tn1ZogMiV8FGYucZ3u8ynG6SFpPjhFAachVHxgBdDZk,8000
|
|
30
30
|
pypynum/random.py,sha256=fGaJfwS0QUWV-qb8hldXpRUYJ-79n7Al0gEmPJMAwJc,2254
|
|
31
31
|
pypynum/regs.py,sha256=mV1r1KkXAv07FmcTntaBF0rcwHBXUyXPvC9h6UOkhE0,2042
|
|
32
|
-
pypynum/seqs.py,sha256=
|
|
33
|
-
pypynum/special.py,sha256=
|
|
32
|
+
pypynum/seqs.py,sha256=Y60nSV32wcuY3zyY8h_l185BURkCJoa82BhZVgI3AMY,11681
|
|
33
|
+
pypynum/special.py,sha256=cuucF1Z6CPRaBiffRKKbStfWaZkbOEqLPTIg7zRXLFQ,19748
|
|
34
34
|
pypynum/stattest.py,sha256=nCAqFjaHVa9EOaWcmgWrhPuBoyLdoypkz6_YeM_AOd8,5511
|
|
35
35
|
pypynum/symbols.py,sha256=u-Dig3OLs6qoLzxMpTAYJGq5uSWDMvgU13TAHKLyjMY,2768
|
|
36
|
-
pypynum/tensors.py,sha256=
|
|
36
|
+
pypynum/tensors.py,sha256=F87npY9VbaCAr0OvTwsW1GAhEQPQAQTVlJzeVuf4zSg,3418
|
|
37
37
|
pypynum/test.py,sha256=HY6TiQr9-wIadRoXElu8TJkVWKMxcahisyWBtew8B9c,8730
|
|
38
38
|
pypynum/this.py,sha256=wT7DwodxqOQ7LoDaUtvskMkAb8CODL_56mtXPy12P54,3411
|
|
39
|
-
pypynum/tools.py,sha256=
|
|
39
|
+
pypynum/tools.py,sha256=bxIoWjjnjlasEYnhrk_2nItKGRndwPrk_f2lK7SLUQ4,25422
|
|
40
40
|
pypynum/trees.py,sha256=b02t69vBjc3ibKaUAkWfBvMDdsugF4DpGC2-q4RsgEU,39779
|
|
41
41
|
pypynum/types.py,sha256=v1lGIL_p0xgxL6mGX7uBQBHBa7UScKCsgPkW8Q6nzlk,3348
|
|
42
42
|
pypynum/ufuncs.py,sha256=Lmr_ZVsswQqbGo2MB8gjd_lijRBOZIy2q2wQBOHvYxM,3549
|
|
43
43
|
pypynum/utils.py,sha256=BhH_iSU44bS6tC3MMrDfIfGhIsQg9nMVlp6fl0-KcRA,21001
|
|
44
|
-
pypynum/vectors.py,sha256=
|
|
45
|
-
pypynum/zh_cn.py,sha256=
|
|
46
|
-
PyPyNum-1.16.
|
|
47
|
-
PyPyNum-1.16.
|
|
48
|
-
PyPyNum-1.16.
|
|
49
|
-
PyPyNum-1.16.
|
|
44
|
+
pypynum/vectors.py,sha256=ANvmI1ftLZPIxO871YLuXUzV6CtvHXrGBf5YIqN_qUE,3390
|
|
45
|
+
pypynum/zh_cn.py,sha256=raTXV7sa9zob3ZtnT263kNFL7NDm-0ZhTrqZIcc88Tk,13812
|
|
46
|
+
PyPyNum-1.16.2.dist-info/METADATA,sha256=K1E_AqE4v-FaRxqCJB8fd4Z_O9jFBlMoPony-pEt_Fc,101387
|
|
47
|
+
PyPyNum-1.16.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
48
|
+
PyPyNum-1.16.2.dist-info/top_level.txt,sha256=4wW_Xb4bRglmiMsdPAe9f75MkXhNpuN88H17g_Cr5u8,8
|
|
49
|
+
PyPyNum-1.16.2.dist-info/RECORD,,
|
pypynum/README.md
CHANGED
|
@@ -20,7 +20,7 @@ processing.</font><font color = red>[Python>=3.4]</font>
|
|
|
20
20
|
[](https://pepy.tech/project/pypynum)
|
|
21
21
|
[](https://pepy.tech/project/pypynum)
|
|
22
22
|
|
|
23
|
-
## Version -> 1.16.
|
|
23
|
+
## Version -> 1.16.2 | PyPI -> https://pypi.org/project/PyPyNum/ | Gitee -> https://www.gitee.com/PythonSJL/PyPyNum | GitHub -> https://github.com/PythonSJL/PyPyNum
|
|
24
24
|
|
|
25
25
|

|
|
26
26
|
|
|
@@ -33,6 +33,15 @@ The logo cannot be displayed on PyPI, it can be viewed in Gitee or GitHub.
|
|
|
33
33
|
+ Update versions periodically to add more practical features
|
|
34
34
|
+ If you need to contact, please add QQ number 2261748025 (Py𝙿𝚢𝚝𝚑𝚘𝚗-水晶兰), or through my email 2261748025@qq.com
|
|
35
35
|
|
|
36
|
+
```
|
|
37
|
+
+++++++++++++++++++++++++++++++++++++++++
|
|
38
|
+
+ Tip: +
|
|
39
|
+
+ Have suggestions or feature requests? +
|
|
40
|
+
+ Feel free to share them with us. +
|
|
41
|
+
+ Your feedback is highly appreciated! +
|
|
42
|
+
+++++++++++++++++++++++++++++++++++++++++
|
|
43
|
+
```
|
|
44
|
+
|
|
36
45
|
### Name and Function Introduction of Submodules
|
|
37
46
|
|
|
38
47
|
| Submodule Name | Function Introduction |
|
|
@@ -113,81 +122,69 @@ Python interpreter and run it!
|
|
|
113
122
|
```
|
|
114
123
|
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
115
124
|
|
|
116
|
-
|
|
117
|
-
a large number of mathematical
|
|
118
|
-
and scientific constants,
|
|
119
|
-
currently totaling 128.
|
|
125
|
+
<<< Here are the newly added functions >>>
|
|
120
126
|
|
|
121
|
-
This module defines a collection
|
|
122
|
-
of constants representing
|
|
123
|
-
various physical, mathematical,
|
|
124
|
-
and unit conversion factors.
|
|
125
127
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
kmp_table(pattern: Union[list, tuple, str]) -> list
|
|
129
|
+
Introduction
|
|
130
|
+
==========
|
|
131
|
+
Generate the KMP (Knuth-Morris-Pratt) table for a given pattern.
|
|
129
132
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
execute 'help(consts)' to
|
|
133
|
-
obtain it.
|
|
133
|
+
The KMP table is used to efficiently find occurrences of a pattern within a sequence by avoiding unnecessary
|
|
134
|
+
comparisons after a mismatch. This table determines how many characters can be skipped after a mismatch.
|
|
134
135
|
|
|
135
|
-
|
|
136
|
+
Example
|
|
137
|
+
========
|
|
138
|
+
>>> kmp_table("AGCTGATCGTACGTAAGCTAGCTA")
|
|
139
|
+
[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 2, 3, 4, 1, 2, 3, 4, 1]
|
|
140
|
+
>>>
|
|
141
|
+
:param pattern: The pattern for which to generate the KMP table.
|
|
142
|
+
:return: A list representing the KMP table for the given pattern.
|
|
136
143
|
|
|
137
144
|
|
|
138
|
-
|
|
145
|
+
findall(seq: Union[list, tuple, str], pat: Union[list, tuple, str]) -> list
|
|
146
|
+
Introduction
|
|
147
|
+
==========
|
|
148
|
+
Find all indices of the subsequence 'pat' in 'seq'.
|
|
139
149
|
|
|
150
|
+
This function is designed to handle sequences such as lists, tuples, or strings and find all indices
|
|
151
|
+
of specified subsequences. It allows overlapping matches.
|
|
140
152
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
│ │ # Calculate the q-gamma function of n with parameter q.
|
|
150
|
-
│ └── qpochhammer(a: typing.Union[int, float, complex], q: typing.Union[int, float, complex], n: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
151
|
-
│ # Compute the q-Pochhammer symbol for given a, q, and n.
|
|
152
|
-
├── multiprec
|
|
153
|
-
│ └── FUNCTION
|
|
154
|
-
│ ├── mp_catalan(sigfigs: int) -> decimal.Decimal
|
|
155
|
-
│ # Calculate the Catalan's constant with a specified number of significant figures using multiprecision arithmetic.
|
|
156
|
-
├── seqs
|
|
157
|
-
│ └── FUNCTION
|
|
158
|
-
│ ├── padovan(n: int, single: bool) -> typing.Union[int, list]
|
|
159
|
-
│ │ # Generate the Padovan sequence up to the nth term.
|
|
160
|
-
│ ├── pelllucas(n: int, single: bool) -> typing.Union[int, list]
|
|
161
|
-
│ │ # Generate the Pell-Lucas sequence up to the nth term.
|
|
162
|
-
│ ├── perrin(n: int, single: bool) -> typing.Union[int, list]
|
|
163
|
-
│ │ # Generate the Perrin sequence up to the nth term.
|
|
164
|
-
│ └── sylvester(n: int, single: bool) -> typing.Union[int, list]
|
|
165
|
-
│ # Generate the Sylvester sequence up to the nth term.
|
|
166
|
-
├── tools
|
|
167
|
-
│ └── FUNCTION
|
|
168
|
-
│ ├── lcsubseq(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> list
|
|
169
|
-
│ │ # Find the longest common subsequence between two sequences x and y.
|
|
170
|
-
│ └── lcsubstr(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> list
|
|
171
|
-
│ # Find the longest common substring between two sequences x and y.
|
|
172
|
-
├── matrices
|
|
173
|
-
│ ├── CLASS
|
|
174
|
-
│ │ └── Matrix(pypynum.arrays.Array)/__init__(self: Any, data: Any, check: Any) -> Any
|
|
175
|
-
│ │ # Initialize a Matrix object from a given data array.
|
|
176
|
-
│ └── FUNCTION
|
|
177
|
-
│ ├── perm_mat(num_rows: int, num_cols: int, row_swaps: typing.Union[list, tuple], col_swaps: typing.Union[list, tuple], rtype: typing.Callable) -> typing.Any
|
|
178
|
-
│ │ # Create a permutation matrix based on specified row and column swaps.
|
|
179
|
-
│ └── perm_mat_indices(num_rows: int, num_cols: int, row_swaps: typing.Union[list, tuple], col_swaps: typing.Union[list, tuple]) -> tuple
|
|
180
|
-
│ # Compute the indices for a permutation matrix based on specified row and column swaps.
|
|
153
|
+
Example
|
|
154
|
+
========
|
|
155
|
+
>>> findall([2, 1, 2, 1, 2, 1, 2, 1], [1, 2, 1, 2])
|
|
156
|
+
[1, 3]
|
|
157
|
+
>>>
|
|
158
|
+
:param seq: The sequence in which to find the subsequence.
|
|
159
|
+
:param pat: The subsequence to be found.
|
|
160
|
+
:return: A list of starting indices where the subsequence is found.
|
|
181
161
|
|
|
182
162
|
|
|
183
|
-
|
|
163
|
+
---------------------------------------------------------------------------------------
|
|
164
|
+
| q-functions generalize classical math functions by introducing parameter q. |
|
|
165
|
+
| They are key in combinatorics and special functions, widely applied. |
|
|
166
|
+
| As q approaches 1, they revert to classical forms. |
|
|
167
|
+
| Examples include q-factorials, q-binomial coefficients, Jackson q-Bessel functions. |
|
|
168
|
+
| These functions are crucial in fractals, chaotic systems, quantum groups. |
|
|
169
|
+
| They provide tools for solving complex mathematical challenges effectively. |
|
|
170
|
+
---------------------------------------------------------------------------------------
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
Here are the 12 new q-functions added in the current version (adding the previous 4 makes a total of 16):
|
|
174
|
+
|
|
184
175
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
176
|
+
qbeta(a: Union[int, float, complex], b: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
177
|
+
qcos_large(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
178
|
+
qcos_small(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
179
|
+
qcosh_large(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
180
|
+
qcosh_small(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
181
|
+
qexp_large(z: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
182
|
+
qexp_small(z: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
183
|
+
qpi(q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
184
|
+
qsin_large(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
185
|
+
qsin_small(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
186
|
+
qsinh_large(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
187
|
+
qsinh_small(x: Union[int, float, complex], q: Union[int, float, complex]) -> Union[int, float, complex]
|
|
191
188
|
|
|
192
189
|
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=
|
|
193
190
|
```
|
|
@@ -225,15 +222,16 @@ PyPyNum
|
|
|
225
222
|
│ ├── asarray(data: Any) -> Any
|
|
226
223
|
│ ├── aslist(data: Any) -> Any
|
|
227
224
|
│ ├── boolarray(data: Any) -> Any
|
|
228
|
-
│ ├── fill(shape:
|
|
229
|
-
│ ├── full(shape:
|
|
230
|
-
│ ├── full_like(a: Any, fill_value: Any, rtype:
|
|
225
|
+
│ ├── fill(shape: typing.Union[list, tuple], sequence: typing.Union[list, tuple], repeat: bool, pad: typing.Any, rtype: typing.Callable) -> typing.Any
|
|
226
|
+
│ ├── full(shape: typing.Union[list, tuple], fill_value: typing.Any, rtype: typing.Callable) -> typing.Any
|
|
227
|
+
│ ├── full_like(a: typing.Any, fill_value: typing.Any, rtype: typing.Callable) -> typing.Any
|
|
231
228
|
│ ├── get_shape(data: Any) -> Any
|
|
232
229
|
│ ├── is_valid_array(_array: Any, _shape: Any) -> Any
|
|
233
|
-
│ ├── ones(shape:
|
|
234
|
-
│ ├── ones_like(a: Any, rtype:
|
|
235
|
-
│ ├──
|
|
236
|
-
│
|
|
230
|
+
│ ├── ones(shape: typing.Union[list, tuple], rtype: typing.Callable) -> typing.Any
|
|
231
|
+
│ ├── ones_like(a: typing.Any, rtype: typing.Callable) -> typing.Any
|
|
232
|
+
│ ├── tensorproduct(tensors: pypynum.arrays.Array) -> pypynum.arrays.Array
|
|
233
|
+
│ ├── zeros(shape: typing.Union[list, tuple], rtype: typing.Callable) -> typing.Any
|
|
234
|
+
│ └── zeros_like(a: typing.Any, rtype: typing.Callable) -> typing.Any
|
|
237
235
|
├── chars
|
|
238
236
|
│ ├── CLASS
|
|
239
237
|
│ └── FUNCTION
|
|
@@ -287,7 +285,7 @@ PyPyNum
|
|
|
287
285
|
│ ├── gamma_pdf(x: Any, shape: Any, scale: Any) -> Any
|
|
288
286
|
│ ├── geometric_pmf(k: Any, p: Any) -> Any
|
|
289
287
|
│ ├── hypergeom_pmf(k: Any, mg: Any, n: Any, nt: Any) -> Any
|
|
290
|
-
│ ├──
|
|
288
|
+
│ ├── invgauss_pdf(x: Any, mu: Any, lambda_: Any, alpha: Any) -> Any
|
|
291
289
|
│ ├── levy_pdf(x: Any, c: Any) -> Any
|
|
292
290
|
│ ├── log_logistic_cdf(x: Any, alpha: Any, beta: Any) -> Any
|
|
293
291
|
│ ├── log_logistic_pdf(x: Any, alpha: Any, beta: Any) -> Any
|
|
@@ -433,7 +431,7 @@ PyPyNum
|
|
|
433
431
|
│ ├── cosh(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
434
432
|
│ ├── cot(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
435
433
|
│ ├── coth(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
436
|
-
│ ├── cov(x: typing.Union[list, tuple], y: typing.Union[list, tuple],
|
|
434
|
+
│ ├── cov(x: typing.Union[list, tuple], y: typing.Union[list, tuple], ddof: int) -> typing.Union[int, float, complex]
|
|
437
435
|
│ ├── crt(n: typing.Union[list, tuple], a: typing.Union[list, tuple]) -> int
|
|
438
436
|
│ ├── csc(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
439
437
|
│ ├── csch(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
@@ -481,13 +479,13 @@ PyPyNum
|
|
|
481
479
|
│ ├── sinh(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
482
480
|
│ ├── skew(data: typing.Union[list, tuple]) -> float
|
|
483
481
|
│ ├── square_mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
|
|
484
|
-
│ ├── std(numbers: typing.Union[list, tuple],
|
|
482
|
+
│ ├── std(numbers: typing.Union[list, tuple], ddof: int) -> typing.Union[int, float, complex]
|
|
485
483
|
│ ├── sumprod(arrays: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
|
|
486
484
|
│ ├── tan(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
487
485
|
│ ├── tanh(x: typing.Union[int, float]) -> typing.Union[int, float]
|
|
488
486
|
│ ├── totient(n: int) -> int
|
|
489
487
|
│ ├── upper_gamma(s: typing.Union[int, float, complex], x: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
490
|
-
│ ├── var(numbers: typing.Union[list, tuple],
|
|
488
|
+
│ ├── var(numbers: typing.Union[list, tuple], ddof: int) -> typing.Union[int, float, complex]
|
|
491
489
|
│ ├── xlogy(x: typing.Union[int, float, complex], y: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
492
490
|
│ └── zeta(alpha: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
493
491
|
├── matrices
|
|
@@ -634,10 +632,22 @@ PyPyNum
|
|
|
634
632
|
│ ├── hyp1f1(a0: typing.Union[int, float, complex], b0: typing.Union[int, float, complex], z: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
635
633
|
│ ├── hyp2f1(a0: typing.Union[int, float, complex], a1: typing.Union[int, float, complex], b0: typing.Union[int, float, complex], z: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
636
634
|
│ ├── hyppfq(a: typing.Union[list, tuple], b: typing.Union[list, tuple], z: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
635
|
+
│ ├── qbeta(a: typing.Union[int, float, complex], b: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
637
636
|
│ ├── qbinomial(n: typing.Union[int, float, complex], m: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
637
|
+
│ ├── qcos_large(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
638
|
+
│ ├── qcos_small(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
639
|
+
│ ├── qcosh_large(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
640
|
+
│ ├── qcosh_small(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
641
|
+
│ ├── qexp_large(z: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
642
|
+
│ ├── qexp_small(z: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
638
643
|
│ ├── qfactorial(n: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
639
644
|
│ ├── qgamma(n: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
640
|
-
│
|
|
645
|
+
│ ├── qpi(q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
646
|
+
│ ├── qpochhammer(a: typing.Union[int, float, complex], q: typing.Union[int, float, complex], n: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
647
|
+
│ ├── qsin_large(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
648
|
+
│ ├── qsin_small(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
649
|
+
│ ├── qsinh_large(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
650
|
+
│ └── qsinh_small(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
|
|
641
651
|
├── stattest
|
|
642
652
|
│ ├── CLASS
|
|
643
653
|
│ └── FUNCTION
|
|
@@ -656,8 +666,7 @@ PyPyNum
|
|
|
656
666
|
│ │ └── Tensor(pypynum.arrays.Array)/__init__(self: Any, data: Any, check: Any) -> Any
|
|
657
667
|
│ └── FUNCTION
|
|
658
668
|
│ ├── ten(data: list) -> pypynum.tensors.Tensor
|
|
659
|
-
│
|
|
660
|
-
│ └── tensorproduct(tensors: pypynum.tensors.Tensor) -> pypynum.tensors.Tensor
|
|
669
|
+
│ └── tensor_and_number(tensor: Any, operator: Any, number: Any) -> Any
|
|
661
670
|
├── test
|
|
662
671
|
│ ├── CLASS
|
|
663
672
|
│ └── FUNCTION
|
|
@@ -668,10 +677,13 @@ PyPyNum
|
|
|
668
677
|
│ ├── CLASS
|
|
669
678
|
│ └── FUNCTION
|
|
670
679
|
│ ├── classify(array: typing.Union[list, tuple]) -> dict
|
|
680
|
+
│ ├── cos_sim(seq1: typing.Union[list, tuple, str], seq2: typing.Union[list, tuple, str], is_vector: bool) -> float
|
|
671
681
|
│ ├── dedup(iterable: typing.Union[list, tuple, str]) -> typing.Union[list, tuple, str]
|
|
672
682
|
│ ├── fast_pow(a: typing.Any, n: int, init: typing.Any, mul: typing.Callable) -> typing.Any
|
|
683
|
+
│ ├── findall(seq: typing.Union[list, tuple, str], pat: typing.Union[list, tuple, str]) -> list
|
|
673
684
|
│ ├── frange(start: typing.Union[int, float], stop: typing.Union[int, float], step: float) -> list
|
|
674
685
|
│ ├── geomspace(start: typing.Union[int, float], stop: typing.Union[int, float], number: int) -> list
|
|
686
|
+
│ ├── kmp_table(pattern: typing.Union[list, tuple, str]) -> list
|
|
675
687
|
│ ├── lcsubseq(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> list
|
|
676
688
|
│ ├── lcsubstr(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> list
|
|
677
689
|
│ ├── levenshtein(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> int
|
|
@@ -680,6 +692,7 @@ PyPyNum
|
|
|
680
692
|
│ ├── primality(n: int, iter_num: int) -> bool
|
|
681
693
|
│ ├── prime_factors(integer: int, dictionary: bool, pollard_rho: bool) -> typing.Union[list, dict]
|
|
682
694
|
│ ├── primes(limit: int) -> list
|
|
695
|
+
│ ├── replace(seq: typing.Union[list, tuple], old: typing.Union[list, tuple], new: typing.Union[list, tuple], count: int) -> typing.Union[list, tuple]
|
|
683
696
|
│ ├── semiprimes(limit: int) -> list
|
|
684
697
|
│ ├── split(iterable: typing.Union[list, tuple, str], key: typing.Union[list, tuple], retain: bool) -> list
|
|
685
698
|
│ └── twinprimes(limit: int) -> list
|
pypynum/__init__.py
CHANGED
|
@@ -68,7 +68,7 @@ from .ufuncs import *
|
|
|
68
68
|
from .utils import *
|
|
69
69
|
from .vectors import *
|
|
70
70
|
|
|
71
|
-
__version__ = "1.16.
|
|
71
|
+
__version__ = "1.16.2"
|
|
72
72
|
print("PyPyNum", "Version -> " + __version__, "PyPI -> https://pypi.org/project/PyPyNum/",
|
|
73
73
|
"Gitee -> https://www.gitee.com/PythonSJL/PyPyNum", "GitHub -> https://github.com/PythonSJL/PyPyNum", sep=" | ")
|
|
74
74
|
for _ in list(globals().keys()):
|