Skip to main content

PyPyNum is a versatile Python math lib. It features modules for math, data analysis, arrays, crypto, physics, RNG, data proc, stats, eq solving, image proc, interp, matrix calc, and high-prec math. Designed for scientific computing, data science, and ML, it offers efficient, general-purpose tools.

Project description

PyPyNum

PyPyNum is a versatile Python math lib. It features modules for math, data analysis, arrays, crypto, physics, RNG, data proc, stats, eq solving, image proc, interp, matrix calc, and high-prec math. Designed for scientific computing, data science, and ML, it offers efficient, general-purpose tools.

 ________   ___    ___  ________   ___    ___  ________    ___  ___   _____ ______
|\   __  \ |\  \  /  /||\   __  \ |\  \  /  /||\   ___  \ |\  \|\  \ |\   _ \  _   \
\ \  \|\  \\ \  \/  / /\ \  \|\  \\ \  \/  / /\ \  \\ \  \\ \  \\\  \\ \  \\\__\ \  \
 \ \   ____\\ \    / /  \ \   ____\\ \    / /  \ \  \\ \  \\ \  \\\  \\ \  \\|__| \  \
  \ \  \___| \/  /  /    \ \  \___| \/  /  /    \ \  \\ \  \\ \  \\\  \\ \  \    \ \  \
   \ \__\  __/  / /       \ \__\  __/  / /       \ \__\\ \__\\ \_______\\ \__\    \ \__\
    \|__| |\___/ /         \|__| |\___/ /         \|__| \|__| \|_______| \|__|     \|__|
          \|___|/                \|___|/

Downloads Downloads Downloads

PyPyNum | Version -> 1.19.0 | PyPI -> https://pypi.org/project/PyPyNum/ | Gitee -> https://www.gitee.com/PythonSJL/PyPyNum | GitHub -> https://github.com/PythonSJL/PyPyNum

LOGO

The logo cannot be displayed on PyPI, it can be viewed in Gitee or GitHub.

Introduction

  • Multi functional math library, similar to numpy, scipy, etc., designed specifically for PyPy interpreters and also supports other types of Python interpreters
  • Update versions periodically to add more practical features
  • If you need to contact, please add QQ number 2261748025 (一只水晶兰), or through my email 2261748025@qq.com
+++++++++++++++++++++++++++++++++++++++++
+ Tip:                                  +
+ Have suggestions or feature requests? +
+ Feel free to share them with us.      +
+ Your feedback is highly appreciated!  +
+++++++++++++++++++++++++++++++++++++++++

Copyright and License

This Python library is licensed under the GNU Affero General Public License version 3 (AGPLv3).

The license is designed to ensure that network server software is made available to the community, allowing users to access the source code of modified versions when the software is used to provide network services.

Key Terms and Conditions:

  • Source Code: The library must be provided with its source code, and any modifications must also be distributed under the AGPLv3.
  • Free Redistribution: The library can be distributed in source and binary forms without any restrictions.
  • No Discrimination: The license does not restrict the use of the software by individuals or organizations, nor does it discriminate against fields of use.
  • No Discrimination Against Persons or Groups: The license does not restrict anyone from receiving the software.
  • Patent License: The patent holder must grant a patent license to anyone who uses the software.
  • No Surrender of Others' Freedom: The license does not allow any conditions that contradict the AGPLv3.
  • Remote Network Interaction: If the software can interact with users remotely, the source code must be made available at no charge.
  • Revised Versions of this License: The Free Software Foundation may publish revised versions of the AGPLv3, and users have the option to follow the terms of any version.
  • Disclaimer of Warranty: There is no warranty for the software, to the extent permitted by applicable law.
  • Limitation of Liability: The copyright holder and any other party who modifies and conveys the software are not liable for damages arising from the use or inability to use the software.

Full License Text:

GNU Affero General Public License

Name and Function Introduction of Submodules

Submodule Name Function Introduction
pypynum.arrays Provides operations and calculations for multi-dimensional arrays.
pypynum.chars Contains a variety of special mathematical characters.
pypynum.ciphers Implements various encryption and decryption algorithms.
pypynum.consts Contains mathematical and physical constants.
pypynum.crandom Generates random complex numbers.
pypynum.dataproc Tools for data preprocessing and transformation.
pypynum.dists Statistical distribution functions and related calculations.
pypynum.equations Solves equations and performs symbolic operations.
pypynum.fft Implements Fast Fourier Transforms and related functionalities.
pypynum.files File reading and writing tools.
pypynum.geoms Geometric shapes and calculation methods.
pypynum.graphs Graph theory algorithms and network analysis.
pypynum.groups Group theory calculations and structural analysis.
pypynum.hypcmpnms Hypercomplex number operations and transformations.
pypynum.images Image processing and manipulation tools.
pypynum.interp Interpolation methods and function approximation.
pypynum.kernels Implementation of kernel functions and methods.
pypynum.logics Simulates logical circuits.
pypynum.maths Basic mathematical operations and commonly used functions.
pypynum.matrices Matrix operations and linear algebra calculations.
pypynum.multiprec High-precision numerical computations.
pypynum.networks Network models and algorithms.
pypynum.numbers Operations on numerical types and properties.
pypynum.plotting Data visualization tools.
pypynum.polys Polynomial operations and calculations.
pypynum.pprinters Advanced printing and formatting output.
pypynum.random Generates arrays of random numbers.
pypynum.regs Regression analysis and model fitting.
pypynum.seqs Computes various mathematical sequences.
pypynum.special Provides advanced special functions for mathematical computations.
pypynum.stattest Statistical tests and data analysis.
pypynum.symbols Symbolic computation and expression manipulation.
pypynum.tensors Tensor operations and calculations.
pypynum.test Simple code testing for the library.
pypynum.this The Zen of the library, expressing its guiding principles.
pypynum.tools General tools and helper functions.
pypynum.trees Tree structures and algorithm implementations.
pypynum.types Contains various types, exceptions, and configurations.
pypynum.ufuncs Universal functions and vectorized operations.
pypynum.utils Utility programs and auxiliary functions.
pypynum.vectors Vector operations and calculations.
pypynum.zh_cn Provides Chinese language interfaces for various functionalities.

The Zen of PyPyNum (Preview)

                The Zen of PyPyNum, by Shen Jiayi

In this mathematical sanctuary, we weave our algorithms with pure Python threads.

Precision outweighs approximation.
Elegance in mathematics transcends the bulky algorithms.
Clarity in logic illuminates the darkest problems.
Simplicity in form is the pinnacle of sophistication.
Flat hierarchies in our code mirror the linear nature of functions.
Sparse code, like a minimal polynomial, retains essence without redundancy.
...

Do you want to view all the content?

Enter "from pypynum import this" in your

Python interpreter and run it!
                                                                September 5, 2024

Functional Changes Compared to the Previous Version

pypynum.images

  • Added comprehensive support for the GIF format, including LZW encoding/decoding, multi-frame animations, interlacing, and local/global palettes.
  • Completely rewrote the JPEG module: now supports progressive JPEG, chroma subsampling (e.g., 4:2:0), grayscale images, restart markers, and dynamic Huffman tree construction.
  • Extended PNG and BMP support to handle low-bit-depth indexed colors (1/2/4-bit) and grayscale modes. Added support for PNG Adam7 interlacing.
  • Introduced octree color quantization and universal image format conversion (e.g., converting between BMP, PNG, JPEG, and GIF with specific color modes).

pypynum.plotting

  • Refactored the plotting module into an object-oriented Canvas class for better state management and rendering.
  • Significantly improved the contour plotting algorithm by implementing adaptive quadtree subdivision and Lipschitz constant interval pruning, replacing the previous brute-force pixel scanning.

pypynum.ufuncs

  • Added a suite of advanced special functions with full support for complex numbers and arrays: gamma, loggamma, beta, logbeta, factorial, logfactorial, pochhammer, and binomial.
  • Added dtype parameter support to universal function applications for better type control.

pypynum.maths

  • Enhanced statistical functions (ptp, median, mean, var, std) to fully support complex number sequences.

pypynum.graphs

  • Improved vertex removal logic to safely handle unconnected nodes across all graph types.
  • Enhanced dijkstra and path reconstruction algorithms to correctly handle unreachable vertices and use all graph vertices for initialization.
  • all_edges() now returns weights as a third element for weighted graphs.

pypynum.arrays & pypynum.matrices

  • Improved multidimensional array indexing: integer and slice indexing now correctly returns the appropriate subtype ( Array or Matrix) rather than raw lists.
  • Added complex number support for max, min, argmax, and argmin operations.
  • basic() now accepts a dtype parameter and properly reshapes 1D results into single-row matrices.

pypynum.dists

  • Standardized parameter names and orderings across multiple statistical distributions for a more intuitive interface ( e.g., scale -> lam for exponential/Poisson distributions, updated parameter models for uniform, Pareto, and Weibull distributions).

Run Time Test

Python interpreter version

  • CPython 3.8.10

  • PyPy 3.10.12

Matrix Time Test NumPy+CPython (seconds) Ranking PyPyNum+PyPy (seconds) Ranking Mpmath_+PyPy (seconds) Ranking SymPy_+PyPy (seconds) Ranking
Create a hundred order random number matrix 0.000083 1 0.005374 2 0.075253 3 0.230530 4
Create a thousand order random number matrix 0.006740 1 0.035666 2 1.200950 3 4.370265 4
Addition of matrices of order one hundred 0.000029 1 0.002163 2 0.045641 4 0.035700 3
Adding matrices of order one thousand 0.002647 1 0.019111 2 1.746957 4 0.771542 3
Determinant of a hundred order matrix 0.087209 2 0.016331 1 4.354507 3 5.157206 4
Determinant of a thousand order matrix 0.616113 1 3.509747 2 It takes a long time 3 It takes a long time 4
Finding the inverse of a hundred order matrix 0.162770 2 0.015768 1 8.162948 3 21.437424 4
Finding the inverse of a thousand order matrix 0.598905 1 17.072552 2 It takes a long time 3 It takes a long time 4
Array output effect [[[[ -7 -67]
[-78  29]]

[[-86 -97]
[ 68  -3]]]


[[[ 11  42]
[ 24 -65]]

[[-60  72]
[ 73   2]]]]
/ [[[[ 37  83]
[ 40   2]]

[[ -5 -34]
[ -7  72]]]


[[[ 13 -64]
[  6  90]]

[[ 68  57]
[ 78  11]]]]
/ [-80.0   -8.0  80.0  -88.0]
[-99.0  -43.0  87.0   81.0]
[ 20.0  -55.0  98.0    8.0]
[  8.0   44.0  64.0  -35.0]

(Only supports matrices)
/ ⎡⎡16   -56⎤  ⎡ 8   -28⎤⎤
⎢⎢        ⎥  ⎢        ⎥⎥
⎢⎣-56  56 ⎦  ⎣-28  28 ⎦⎥
⎢                      ⎥
⎢ ⎡-2  7 ⎤   ⎡-18  63 ⎤⎥
⎢ ⎢      ⎥   ⎢        ⎥⎥
⎣ ⎣7   -7⎦   ⎣63   -63⎦⎦
/

Basic Structure

PyPyNum
├── arrays
│   ├── CLASS
│   │   ├── Array(object)/__init__(self: Any, data: Any, check: Any, dtype: Any) -> Any
│   │   └── BoolArray(pypynum.arrays.Array)/__init__(self: Any, data: Any, check: Any, dtype: Any) -> Any
│   └── FUNCTION
│       ├── array(data: Any, dtype: Any) -> Any
│       ├── boolarray(data: Any) -> Any
│       ├── fill(shape: typing.Sequence, sequence: typing.Sequence, repeat: bool, pad: typing.Any, rtype: typing.Callable, dtype: type) -> typing.Any
│       ├── full(shape: typing.Sequence, fill_value: typing.Any, rtype: typing.Callable, dtype: type) -> typing.Any
│       ├── full_like(a: typing.Any, fill_value: typing.Any, rtype: typing.Callable, dtype: type) -> typing.Any
│       ├── get_shape(data: Any) -> Any
│       ├── is_valid_array(_array: Any, _shape: Any) -> Any
│       ├── ones(shape: typing.Sequence, rtype: typing.Callable, dtype: type) -> typing.Any
│       ├── ones_like(a: typing.Any, rtype: typing.Callable, dtype: type) -> typing.Any
│       ├── tensorproduct(tensors: pypynum.arrays.Array) -> pypynum.arrays.Array
│       ├── zeros(shape: typing.Sequence, rtype: typing.Callable, dtype: type) -> typing.Any
│       └── zeros_like(a: typing.Any, rtype: typing.Callable, dtype: type) -> typing.Any
├── chars
│   ├── CLASS
│   └── FUNCTION
│       ├── int2subscript(standard_str: str) -> str
│       ├── int2superscript(standard_str: str) -> str
│       ├── subscript2int(subscript_str: str) -> str
│       └── superscript2int(superscript_str: str) -> str
├── ciphers
│   ├── CLASS
│   └── FUNCTION
│       ├── atbash(text: str) -> str
│       ├── base_64(text: bytes, decrypt: bool) -> bytes
│       ├── caesar(text: str, shift: int, decrypt: bool) -> str
│       ├── hill256(text: bytes, key: list, decrypt: bool) -> bytes
│       ├── ksa(key: bytes) -> list
│       ├── morse(text: str, decrypt: bool) -> str
│       ├── playfair(text: str, key: str, decrypt: bool) -> str
│       ├── prga(s: list) -> Any
│       ├── rc4(text: bytes, key: bytes) -> bytes
│       ├── rot13(text: str) -> str
│       ├── substitution(text: str, sub_map: dict, decrypt: bool) -> str
│       └── vigenere(text: str, key: str, decrypt: bool) -> str
├── consts
│   ├── CLASS
│   └── FUNCTION
├── crandom
│   ├── CLASS
│   └── FUNCTION
│       ├── randint_polar(left: int, right: int, mod: typing.Union[int, float], angle: typing.Union[int, float]) -> complex
│       ├── randint_rect(left: int, right: int, real: typing.Union[int, float], imag: typing.Union[int, float]) -> complex
│       ├── random_polar(mod: typing.Union[int, float], angle: typing.Union[int, float]) -> complex
│       ├── random_rect(real: typing.Union[int, float], imag: typing.Union[int, float]) -> complex
│       ├── uniform_polar(left: typing.Union[int, float], right: typing.Union[int, float], mod: typing.Union[int, float], angle: typing.Union[int, float]) -> complex
│       └── uniform_rect(left: typing.Union[int, float], right: typing.Union[int, float], real: typing.Union[int, float], imag: typing.Union[int, float]) -> complex
├── dataproc
│   ├── CLASS
│   │   └── Series(object)/__init__(self: Any, data: typing.Any, index: typing.Any) -> None
│   └── FUNCTION
├── dists
│   ├── CLASS
│   └── FUNCTION
│       ├── beta_pdf(x: Any, alpha: Any, beta: Any) -> Any
│       ├── binom_pmf(k: Any, n: Any, p: Any) -> Any
│       ├── cauchy_cdf(x: Any, x0: Any, gamma: Any) -> Any
│       ├── cauchy_pdf(x: Any, x0: Any, gamma: Any) -> Any
│       ├── chi2_cdf(x: Any, df: Any) -> Any
│       ├── chi2_pdf(x: Any, df: Any) -> Any
│       ├── expon_cdf(x: Any, lam: Any) -> Any
│       ├── expon_pdf(x: Any, lam: Any) -> Any
│       ├── f_pdf(x: Any, dfnum: Any, dfden: Any) -> Any
│       ├── gamma_pdf(x: Any, shape: Any, scale: Any) -> Any
│       ├── geometric_pmf(k: Any, p: Any) -> Any
│       ├── hypergeom_pmf(k: Any, N: Any, K: Any, n: Any) -> Any
│       ├── invgauss_pdf(x: Any, mu: Any, lam: Any) -> Any
│       ├── levy_pdf(x: Any, c: Any) -> Any
│       ├── log_logistic_cdf(x: Any, alpha: Any, beta: Any) -> Any
│       ├── log_logistic_pdf(x: Any, alpha: Any, beta: Any) -> Any
│       ├── logistic_cdf(x: Any, loc: Any, scale: Any) -> Any
│       ├── logistic_pdf(x: Any, loc: Any, scale: Any) -> Any
│       ├── lognorm_cdf(x: Any, mu: Any, sigma: Any) -> Any
│       ├── lognorm_pdf(x: Any, mu: Any, sigma: Any) -> Any
│       ├── logser_pmf(k: Any, p: Any) -> Any
│       ├── multinomial_pmf(k: Any, n: Any, p: Any) -> Any
│       ├── nbinom_pmf(k: Any, r: Any, p: Any) -> Any
│       ├── nhypergeom_pmf(k: Any, N: Any, K: Any, r: Any) -> Any
│       ├── normal_cdf(x: Any, mu: Any, sigma: Any) -> Any
│       ├── normal_pdf(x: Any, mu: Any, sigma: Any) -> Any
│       ├── pareto_pdf(x: Any, alpha: Any, x_m: Any) -> Any
│       ├── poisson_pmf(k: Any, lam: Any) -> Any
│       ├── rayleigh_pdf(x: Any, sigma: Any) -> Any
│       ├── t_pdf(x: Any, df: Any) -> Any
│       ├── uniform_cdf(x: Any, a: Any, b: Any) -> Any
│       ├── uniform_pdf(x: Any, a: Any, b: Any) -> Any
│       ├── vonmises_pdf(x: Any, mu: Any, kappa: Any) -> Any
│       ├── weibull_max_pdf(x: Any, k: Any, scale: Any, loc: Any) -> Any
│       ├── weibull_min_pdf(x: Any, k: Any, scale: Any, loc: Any) -> Any
│       └── zipf_pmf(k: Any, s: Any, n: Any) -> Any
├── equations
│   ├── CLASS
│   └── FUNCTION
│       ├── lin_eq(left: list, right: list) -> list
│       └── poly_eq(coefficients: list) -> list
├── fft
│   ├── CLASS
│   │   └── FT1D(object)/__init__(self: Any, data: Any) -> Any
│   └── FUNCTION
├── files
│   ├── CLASS
│   └── FUNCTION
│       ├── read(file: str) -> list
│       └── write(file: str, cls: object) -> Any
├── geoms
│   ├── CLASS
│   │   ├── Circle(object)/__init__(self: Any, center: typing.Union[list, tuple], radius: typing.Union[int, float]) -> Any
│   │   ├── Line(object)/__init__(self: Any, a: typing.Union[list, tuple], b: typing.Union[list, tuple]) -> Any
│   │   ├── Point(object)/__init__(self: Any, p: typing.Union[list, tuple]) -> Any
│   │   ├── Polygon(object)/__init__(self: Any, p: typing.Union[list, tuple]) -> Any
│   │   ├── 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
│   │   └── Triangle(object)/__init__(self: Any, a: typing.Union[list, tuple], b: typing.Union[list, tuple], c: typing.Union[list, tuple]) -> Any
│   └── FUNCTION
│       ├── _rotate_point(p: Any, theta: Any, cx: Any, cy: Any) -> Any
│       ├── _scale_point(p: Any, k: Any, cx: Any, cy: Any) -> Any
│       └── distance(g1: Any, g2: Any, error: typing.Union[int, float]) -> float
├── graphs
│   ├── CLASS
│   │   ├── BaseGraph(object)/__init__(self: Any) -> Any
│   │   ├── BaseWeGraph(pypynum.graphs.BaseGraph)/__init__(self: Any) -> Any
│   │   ├── DiGraph(pypynum.graphs.BaseGraph)/__init__(self: Any) -> Any
│   │   ├── UnGraph(pypynum.graphs.BaseGraph)/__init__(self: Any) -> Any
│   │   ├── WeDiGraph(pypynum.graphs.BaseWeGraph)/__init__(self: Any) -> Any
│   │   └── WeUnGraph(pypynum.graphs.BaseWeGraph)/__init__(self: Any) -> Any
│   └── FUNCTION
├── groups
│   ├── CLASS
│   │   └── Group(object)/__init__(self: Any, data: Any, operation: Any) -> Any
│   └── FUNCTION
│       └── group(data: Any, operation: Any) -> Any
├── hypcmpnms
│   ├── CLASS
│   │   ├── Euler(object)/__init__(self: Any, y: typing.Union[int, float], p: typing.Union[int, float], r: typing.Union[int, float]) -> Any
│   │   ├── Octonion(object)/__init__(self: Any, s: typing.Union[int, float], t: typing.Union[int, float], u: typing.Union[int, float], v: typing.Union[int, float], w: typing.Union[int, float], x: typing.Union[int, float], y: typing.Union[int, float], z: typing.Union[int, float]) -> Any
│   │   └── 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
│   └── FUNCTION
│       ├── convert(data: typing.Union[pypynum.hypcmpnms.Quaternion, pypynum.matrices.Matrix, pypynum.hypcmpnms.Euler], to: str) -> typing.Union[pypynum.hypcmpnms.Quaternion, pypynum.matrices.Matrix, pypynum.hypcmpnms.Euler]
│       ├── euler(yaw: typing.Union[int, float], pitch: typing.Union[int, float], roll: typing.Union[int, float]) -> pypynum.hypcmpnms.Euler
│       ├── octo(s: typing.Union[int, float], t: typing.Union[int, float], u: typing.Union[int, float], v: typing.Union[int, float], w: typing.Union[int, float], x: typing.Union[int, float], y: typing.Union[int, float], z: typing.Union[int, float]) -> pypynum.hypcmpnms.Octonion
│       └── quat(w: typing.Union[int, float], x: typing.Union[int, float], y: typing.Union[int, float], z: typing.Union[int, float]) -> pypynum.hypcmpnms.Quaternion
├── images
│   ├── CLASS
│   │   ├── BMP(pypynum.images.BaseImage)/__init__(self: Any) -> None
│   │   ├── BaseImage(object)/__init__(self: Any) -> None
│   │   ├── GIF(pypynum.images.BaseImage)/__init__(self: Any) -> None
│   │   ├── JPEG(pypynum.images.BaseImage)/__init__(self: Any) -> None
│   │   ├── OctreeNode(object)/__init__(self: Any, level: Any, parent: Any) -> Any
│   │   ├── PNG(pypynum.images.BaseImage)/__init__(self: Any) -> None
│   │   ├── _BitReader(object)/__init__(self: Any, data: bytes) -> None
│   │   └── _BitWriter(object)/__init__(self: Any) -> None
│   └── FUNCTION
│       ├── __dht2dict(dht_bytes: Any) -> Any
│       ├── _deinterlace(pixels: list, w: int, h: int) -> list
│       ├── _find_closest_color(color: Any, palette: Any, octree_root: Any) -> int
│       ├── _interlace(pixels: list, w: int, h: int) -> list
│       ├── _lzw_decode(min_code_size: int, data: bytes) -> list
│       ├── _lzw_encode(min_code_size: int, pixels: list) -> bytes
│       ├── _norm_palette(pal: list) -> list
│       ├── _read_sub_blocks(data: bytes, offset: int) -> tuple
│       ├── _write_sub_blocks(raw: bytes) -> bytes
│       ├── entropy(data: typing.Any) -> float
│       ├── jpeg_adjust_qtable(qtable: typing.Union[list, tuple], quality: int) -> list
│       ├── jpeg_category(data: typing.Any, reverse: bool) -> typing.Any
│       ├── jpeg_channel_encoding(matrix: list, quality: int, mode: int) -> tuple
│       ├── jpeg_chroma_dc_huff(data: typing.Any, reverse: bool) -> typing.Any
│       ├── jpeg_dct8x8(block: typing.Union[list, tuple], reverse: bool) -> list
│       ├── jpeg_decode_pixels(scan_data: bytes, q_tables: dict, huff_tables: dict, width: int, height: int, yh: int, yv: int, comp_ids: list, comp_info: dict, comp_huff: dict, rst_offsets: list) -> list
│       ├── jpeg_decode_progressive_pixels(scans_info: Any, q_tables: Any, huff_tables: Any, width: Any, height: Any, yh: Any, yv: Any, comp_ids: Any, comp_info: Any, comp_huff: Any) -> Any
│       ├── jpeg_encode_pixels(pixels: typing.Union[list, tuple], quality: int, subsampling: str) -> tuple
│       ├── jpeg_encode_progressive_pixels(pixels: Any, quality: Any, subsampling: Any) -> Any
│       ├── jpeg_luma_dc_huff(data: typing.Any, reverse: bool) -> typing.Any
│       ├── jpeg_rle_decoding(sequence: typing.Union[list, tuple]) -> list
│       ├── jpeg_rle_encoding(sequence: typing.Union[list, tuple]) -> list
│       ├── jpeg_split_pixels(matrix: list) -> list
│       ├── jpeg_zigzag(data: typing.Union[list, tuple], reverse: bool) -> list
│       ├── octree_quantize(pixels: Any, num_colors: Any) -> Any
│       ├── png_apply_filter(pixels: list, above_pixels: list, filter_type: int) -> list
│       ├── png_reverse_filter(pixels: list, above_pixels: list, filter_type: int) -> list
│       ├── rgb2ycbcr(weights: typing.Union[list, tuple]) -> tuple
│       └── ycbcr2rgb(weights: typing.Union[list, tuple]) -> tuple
├── interp
│   ├── CLASS
│   └── FUNCTION
│       ├── bicubic(x: Any) -> Any
│       ├── contribute(src: Any, x: Any, y: Any, channels: Any) -> Any
│       ├── interp1d(data: typing.Union[list, tuple], length: int) -> list
│       └── interp2d(src: Any, new_height: Any, new_width: Any, channels: Any, round_res: Any, min_val: Any, max_val: Any) -> Any
├── kernels
│   ├── CLASS
│   └── FUNCTION
│       ├── det2x2kernel(a: typing.Union[list, tuple]) -> float
│       ├── det3x3kernel(a: typing.Union[list, tuple]) -> float
│       ├── det4x4kernel(a: typing.Union[list, tuple]) -> float
│       ├── eigen2x2kernel(a: typing.Union[list, tuple]) -> tuple
│       ├── inv2x2kernel(a: typing.Union[list, tuple]) -> list
│       ├── inv3x3kernel(a: typing.Union[list, tuple]) -> list
│       ├── inv4x4kernel(a: typing.Union[list, tuple]) -> list
│       ├── lu2x2kernel(a: typing.Union[list, tuple]) -> tuple
│       ├── lu3x3kernel(a: typing.Union[list, tuple]) -> tuple
│       ├── lu4x4kernel(a: typing.Union[list, tuple]) -> tuple
│       ├── matexp2x2kernel(a: typing.Union[list, tuple]) -> list
│       ├── matmul2x2kernel(a: typing.Union[list, tuple], b: typing.Union[list, tuple]) -> list
│       ├── matmul3x3kernel(a: typing.Union[list, tuple], b: typing.Union[list, tuple]) -> list
│       ├── matmul4x4kernel(a: typing.Union[list, tuple], b: typing.Union[list, tuple]) -> list
│       ├── matmul8x8kernel(a: typing.Union[list, tuple], b: typing.Union[list, tuple]) -> list
│       └── matpow2x2kernel(a: typing.Union[list, tuple], n: typing.Union[int, float, complex]) -> list
├── logics
│   ├── CLASS
│   │   ├── AND(pypynum.logics.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
│   │   ├── Basic(object)/__init__(self: Any, label: Any) -> Any
│   │   ├── Binary(pypynum.logics.Basic)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
│   │   ├── COMP(pypynum.logics.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
│   │   ├── DFF(pypynum.logics.Unary)/__init__(self: Any, label: Any, pin0: Any, state: Any) -> Any
│   │   ├── FullAdder(pypynum.logics.Ternary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any) -> Any
│   │   ├── FullSuber(pypynum.logics.Ternary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any) -> Any
│   │   ├── HalfAdder(pypynum.logics.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
│   │   ├── HalfSuber(pypynum.logics.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
│   │   ├── JKFF(pypynum.logics.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, state: Any) -> Any
│   │   ├── NAND(pypynum.logics.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
│   │   ├── NOR(pypynum.logics.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
│   │   ├── NOT(pypynum.logics.Unary)/__init__(self: Any, label: Any, pin0: Any) -> Any
│   │   ├── OR(pypynum.logics.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
│   │   ├── Quaternary(pypynum.logics.Basic)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any, pin3: Any) -> Any
│   │   ├── TFF(pypynum.logics.Unary)/__init__(self: Any, label: Any, pin0: Any, state: Any) -> Any
│   │   ├── Ternary(pypynum.logics.Basic)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any) -> Any
│   │   ├── TwoBDiver(pypynum.logics.Quaternary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any, pin3: Any) -> Any
│   │   ├── TwoBMuler(pypynum.logics.Quaternary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any, pin2: Any, pin3: Any) -> Any
│   │   ├── Unary(pypynum.logics.Basic)/__init__(self: Any, label: Any, pin0: Any) -> Any
│   │   ├── XNOR(pypynum.logics.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
│   │   └── XOR(pypynum.logics.Binary)/__init__(self: Any, label: Any, pin0: Any, pin1: Any) -> Any
│   └── FUNCTION
│       └── connector(previous: Any, latter: Any) -> Any
├── maths
│   ├── CLASS
│   └── FUNCTION
│       ├── arrangement(n: int, r: int) -> int
│       ├── combination(n: int, r: int) -> int
│       ├── acos(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── acosh(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── acot(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── acoth(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── acsc(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── acsch(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── arrangement(n: int, r: int) -> int
│       ├── asec(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── asech(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── asin(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── asinh(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── atan(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── atanh(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── average(data: typing.Union[list, tuple], weights: typing.Union[list, tuple]) -> float
│       ├── central_moment(data: typing.Union[list, tuple], order: int) -> float
│       ├── coeff_det(x: typing.Union[list, tuple], y: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
│       ├── combination(n: int, r: int) -> int
│       ├── corr_coeff(x: typing.Union[list, tuple], y: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
│       ├── cos(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── cosh(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── cot(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── coth(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── cov(x: typing.Union[list, tuple], y: typing.Union[list, tuple], ddof: int) -> typing.Union[int, float, complex]
│       ├── crt(n: typing.Union[list, tuple], a: typing.Union[list, tuple]) -> int
│       ├── csc(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── csch(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── cumprod(lst: typing.Union[list, tuple]) -> list
│       ├── cumsum(lst: typing.Union[list, tuple]) -> list
│       ├── deriv(f: Any, x: float, h: float, method: str, args: Any, kwargs: Any) -> Any
│       ├── dsigmoid(x: typing.Union[int, float]) -> float
│       ├── erf(x: typing.Union[int, float]) -> float
│       ├── exgcd(a: int, b: int) -> tuple
│       ├── exp(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── freq(data: typing.Union[list, tuple]) -> dict
│       ├── gcd(args: int) -> int
│       ├── geom_mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
│       ├── harm_mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
│       ├── integ(f: Any, x_start: typing.Union[int, float], x_end: typing.Union[int, float], n: int, args: Any, kwargs: Any) -> float
│       ├── iroot(y: int, n: int) -> int
│       ├── is_possibly_square(n: int) -> bool
│       ├── is_square(n: int) -> bool
│       ├── isqrt(x: int) -> int
│       ├── kurt(data: typing.Union[list, tuple], fisher: bool) -> float
│       ├── lcm(args: int) -> int
│       ├── ln(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── lowergamma(s: typing.Union[int, float, complex], x: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
│       ├── median(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
│       ├── mod_order(a: int, n: int, b: int) -> int
│       ├── mode(data: typing.Union[list, tuple]) -> Any
│       ├── normalize(data: typing.Union[list, tuple], target: typing.Union[int, float, complex]) -> typing.Union[list, tuple]
│       ├── parity(x: int) -> int
│       ├── pi(i: int, n: int, f: Any) -> typing.Union[int, float, complex]
│       ├── power_mean(numbers: typing.Union[list, tuple], p: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── primitive_root(a: int, single: bool) -> typing.Union[int, list]
│       ├── product(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
│       ├── ptp(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
│       ├── quantile(data: list, q: float, interpolation: str, ordered: bool) -> float
│       ├── raw_moment(data: typing.Union[list, tuple], order: int) -> float
│       ├── roll(seq: typing.Union[list, tuple, str], shift: int) -> typing.Union[list, tuple, str]
│       ├── root(x: typing.Union[int, float, complex], y: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── sec(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── sech(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── sigma(i: int, n: int, f: Any) -> typing.Union[int, float, complex]
│       ├── sigmoid(x: typing.Union[int, float]) -> float
│       ├── sign(x: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── sin(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── sinh(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── skew(data: typing.Union[list, tuple]) -> float
│       ├── square_mean(numbers: typing.Union[list, tuple]) -> typing.Union[int, float, complex]
│       ├── std(numbers: typing.Union[list, tuple], ddof: int) -> typing.Union[int, float, complex]
│       ├── sumprod(arrays: typing.Union[list, tuple], floating: bool) -> typing.Union[int, float, complex]
│       ├── tan(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── tanh(x: typing.Union[int, float]) -> typing.Union[int, float]
│       ├── totient(n: int) -> int
│       ├── uppergamma(s: typing.Union[int, float, complex], x: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── var(numbers: typing.Union[list, tuple], ddof: int) -> typing.Union[int, float, complex]
│       ├── xlogy(x: typing.Union[int, float, complex], y: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       └── zeta(alpha: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
├── matrices
│   ├── CLASS
│   │   └── Matrix(pypynum.arrays.Array)/__init__(self: Any, data: Any, check: Any, dtype: Any) -> Any
│   └── FUNCTION
│       ├── cholesky(matrix: pypynum.matrices.Matrix, hermitian: bool, dtype: Any) -> pypynum.matrices.Matrix
│       ├── dctmtx(n: int, dtype: Any) -> pypynum.matrices.Matrix
│       ├── diag(v: typing.Any, k: int, n: int, m: int, dtype: Any) -> typing.Any
│       ├── diag_indices(n: int, k: int, m: int) -> tuple
│       ├── eigen(matrix: pypynum.matrices.Matrix, dtype: Any) -> tuple
│       ├── hessenberg(matrix: pypynum.matrices.Matrix, dtype: Any) -> tuple
│       ├── identity(n: int, m: int, dtype: Any) -> pypynum.matrices.Matrix
│       ├── lu(matrix: pypynum.matrices.Matrix, dtype: Any) -> tuple
│       ├── mat(data: typing.Any, dtype: Any) -> pypynum.matrices.Matrix
│       ├── perm_mat(num_rows: int, num_cols: int, row_swaps: typing.Union[list, tuple], col_swaps: typing.Union[list, tuple], rtype: typing.Callable, dtype: Any) -> typing.Any
│       ├── perm_mat_indices(num_rows: int, num_cols: int, row_swaps: typing.Union[list, tuple], col_swaps: typing.Union[list, tuple]) -> tuple
│       ├── qr(matrix: pypynum.matrices.Matrix, reduce: bool, dtype: Any) -> tuple
│       ├── rank_decomp(matrix: pypynum.matrices.Matrix, dtype: Any) -> tuple
│       ├── rotate90(matrix: pypynum.matrices.Matrix, times: int, dtype: Any) -> pypynum.matrices.Matrix
│       ├── svd(matrix: pypynum.matrices.Matrix, full: bool, calc_uv: bool, dtype: Any) -> tuple
│       ├── tril_indices(n: int, k: int, m: int) -> tuple
│       └── triu_indices(n: int, k: int, m: int) -> tuple
├── multiprec
│   ├── CLASS
│   │   └── MPComplex(object)/__init__(self: Any, real: Any, imag: Any, sigfigs: Any) -> Any
│   └── FUNCTION
│       ├── _remove_trailing_zeros(value: typing.Any) -> str
│       ├── _setprec(sigfigs: int) -> Any
│       ├── asmpc(real: typing.Union[int, float, str, decimal.Decimal, complex, pypynum.multiprec.MPComplex], imag: typing.Union[int, float, str, decimal.Decimal], sigfigs: int) -> pypynum.multiprec.MPComplex
│       ├── frac2dec(frac: fractions.Fraction, sigfigs: int) -> decimal.Decimal
│       ├── mp_acos(x: typing.Union[int, float, str, decimal.Decimal], sigfigs: int) -> decimal.Decimal
│       ├── mp_asin(x: typing.Union[int, float, str, decimal.Decimal], sigfigs: int) -> decimal.Decimal
│       ├── mp_atan(x: typing.Union[int, float, str, decimal.Decimal], sigfigs: int) -> decimal.Decimal
│       ├── mp_atan2(y: typing.Union[int, float, str, decimal.Decimal], x: typing.Union[int, float, str, decimal.Decimal], sigfigs: int) -> decimal.Decimal
│       ├── mp_catalan(sigfigs: int) -> decimal.Decimal
│       ├── mp_cos(x: typing.Union[int, float, str, decimal.Decimal], sigfigs: int) -> decimal.Decimal
│       ├── mp_cosh(x: typing.Union[int, float, str, decimal.Decimal], sigfigs: int) -> decimal.Decimal
│       ├── mp_e(sigfigs: int, method: str) -> decimal.Decimal
│       ├── mp_euler_gamma(sigfigs: int) -> decimal.Decimal
│       ├── mp_exp(x: typing.Union[int, float, str, decimal.Decimal], sigfigs: int, builtin: bool) -> decimal.Decimal
│       ├── mp_fresnel_c(x: typing.Union[int, float, str, decimal.Decimal], sigfigs: int) -> decimal.Decimal
│       ├── mp_fresnel_s(x: typing.Union[int, float, str, decimal.Decimal], sigfigs: int) -> decimal.Decimal
│       ├── mp_ln(x: typing.Union[int, float, str, decimal.Decimal], sigfigs: int, builtin: bool) -> decimal.Decimal
│       ├── mp_log(x: typing.Union[int, float, str, decimal.Decimal], base: typing.Union[int, float, str, decimal.Decimal], sigfigs: int, builtin: bool) -> decimal.Decimal
│       ├── mp_phi(sigfigs: int, method: str) -> decimal.Decimal
│       ├── mp_pi(sigfigs: int, method: str) -> decimal.Decimal
│       ├── mp_sin(x: typing.Union[int, float, str, decimal.Decimal], sigfigs: int) -> decimal.Decimal
│       └── mp_sinh(x: typing.Union[int, float, str, decimal.Decimal], sigfigs: int) -> decimal.Decimal
├── networks
│   ├── CLASS
│   │   └── NeuralNetwork(object)/__init__(self: Any, _input: Any, _hidden: Any, _output: Any) -> Any
│   └── FUNCTION
│       └── neuraln(_input: Any, _hidden: Any, _output: Any) -> Any
├── numbers
│   ├── CLASS
│   └── FUNCTION
│       ├── float2fraction(number: float, mixed: bool, error: float) -> tuple
│       ├── int2roman(integer: int, overline: bool) -> str
│       ├── int2words(integer: int) -> str
│       ├── parse_float(s: str) -> tuple
│       ├── roman2int(roman_num: str) -> int
│       ├── round_sigfig(number: str, n: int, scientific: bool) -> str
│       ├── str2int(string: str) -> int
│       └── words2int(words: str) -> int
├── plotting
│   ├── CLASS
│   │   └── Canvas(object)/__init__(self: Any, xlim: tuple, ylim: tuple, resolution: typing.Union[int, float], aspect_ratio: typing.Union[int, float]) -> Any
│   └── FUNCTION
│       ├── colortext(text: str, rgb: typing.Union[list, tuple]) -> str
│       ├── estimate_lipschitz(func: Any, domain: Any, threshold: Any, n: Any, safety: Any) -> Any
│       └── safe_eval(func: Any, x: Any, y: Any, threshold: Any) -> Any
├── polys
│   ├── CLASS
│   │   └── Polynomial(object)/__init__(self: Any, terms: Any) -> Any
│   └── FUNCTION
│       ├── chebgauss(n: Any) -> Any
│       ├── chebpoly(n: Any, single: Any) -> Any
│       ├── from_coeffs(coeffs: Any) -> Any
│       ├── from_coords(coords: Any) -> Any
│       ├── laggauss(n: Any) -> Any
│       ├── lagpoly(n: Any, single: Any) -> Any
│       ├── leggauss(n: Any) -> Any
│       ├── legpoly(n: Any, single: Any) -> Any
│       └── poly(terms: Any) -> Any
├── pprinters
│   ├── CLASS
│   └── FUNCTION
│       └── pprint_matrix(matrix: Any, style: Any, output: Any) -> Any
├── random
│   ├── CLASS
│   └── FUNCTION
│       ├── __create_nested_list(dimensions: Any, func: Any) -> Any
│       ├── __validate_shape(shape: Any) -> Any
│       ├── choice(seq: typing.Union[list, tuple, str], shape: typing.Union[list, tuple]) -> Any
│       ├── gauss(mu: typing.Union[int, float], sigma: typing.Union[int, float], shape: typing.Union[list, tuple]) -> typing.Union[float, list]
│       ├── rand(shape: typing.Union[list, tuple]) -> typing.Union[float, list]
│       ├── randint(a: int, b: int, shape: typing.Union[list, tuple]) -> typing.Union[int, list]
│       └── uniform(a: typing.Union[int, float], b: typing.Union[int, float], shape: typing.Union[list, tuple]) -> typing.Union[float, list]
├── regs
│   ├── CLASS
│   └── FUNCTION
│       ├── lin_reg(x: typing.Union[list, tuple], y: typing.Union[list, tuple]) -> list
│       ├── par_reg(x: typing.Union[list, tuple], y: typing.Union[list, tuple]) -> list
│       └── poly_reg(x: typing.Union[list, tuple], y: typing.Union[list, tuple], n: int) -> list
├── seqs
│   ├── CLASS
│   └── FUNCTION
│       ├── 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
│       ├── bell(n: int) -> list
│       ├── bernoulli(n: int, single: bool) -> typing.Union[list, tuple]
│       ├── catalan(n: int, single: bool) -> typing.Union[int, list]
│       ├── farey(n: int) -> list
│       ├── fibonacci(n: int, single: bool) -> typing.Union[int, list]
│       ├── 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
│       ├── lucas(n: int, single: bool) -> typing.Union[int, list]
│       ├── padovan(n: int, single: bool) -> typing.Union[int, list]
│       ├── pascal(n: int) -> list
│       ├── pell(n: int, single: bool) -> typing.Union[int, list]
│       ├── pelllucas(n: int, single: bool) -> typing.Union[int, list]
│       ├── perrin(n: int, single: bool) -> typing.Union[int, list]
│       ├── recaman(n: int, single: bool) -> typing.Union[int, list]
│       ├── stirling1(n: int, sign: bool) -> list
│       ├── stirling2(n: int) -> list
│       ├── sylvester(n: int, single: bool) -> typing.Union[int, list]
│       ├── tetranacci(n: int, single: bool) -> typing.Union[int, list]
│       └── tribonacci(n: int, single: bool) -> typing.Union[int, list]
├── special
│   ├── CLASS
│   └── FUNCTION
│       ├── besseli0(x: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── besseli1(x: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── besseliv(v: typing.Union[int, float], x: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── besselj0(x: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── besselj1(x: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── besseljv(v: typing.Union[int, float], x: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── ellipe(m: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── ellipk(m: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── hyp0f1(b0: typing.Union[int, float, complex], z: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── hyp1f1(a0: typing.Union[int, float, complex], b0: typing.Union[int, float, complex], z: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── 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]
│       ├── hyppfq(a: typing.Union[list, tuple], b: typing.Union[list, tuple], z: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qbeta(a: typing.Union[int, float, complex], b: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qbinomial(n: typing.Union[int, float, complex], m: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qcos_large(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qcos_small(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qcosh_large(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qcosh_small(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qexp_large(z: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qexp_small(z: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qfactorial(n: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qgamma(n: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qpi(q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qpochhammer(a: typing.Union[int, float, complex], q: typing.Union[int, float, complex], n: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qsin_large(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qsin_small(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       ├── qsinh_large(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
│       └── qsinh_small(x: typing.Union[int, float, complex], q: typing.Union[int, float, complex]) -> typing.Union[int, float, complex]
├── stattest
│   ├── CLASS
│   └── FUNCTION
│       ├── chi2_cont(contingency: list, lambda_: float, calc_p: bool, corr: bool) -> tuple
│       ├── chisquare(observed: list, expected: list) -> tuple
│       ├── kurttest(data: list, two_tailed: bool) -> tuple
│       ├── mediantest(samples: Any, ties: Any, lambda_: Any, corr: Any) -> Any
│       ├── normaltest(data: list) -> tuple
│       └── skewtest(data: list, two_tailed: bool) -> tuple
├── symbols
│   ├── CLASS
│   │   └── Expr(object)/__init__(self: Any, tree: typing.Union[str, pypynum.trees.BinaryTree]) -> Any
│   └── FUNCTION
│       ├── build_expr_tree(postfix_expr: list) -> pypynum.trees.BinaryTree
│       ├── infix2postfix(infix_expr: list) -> list
│       ├── parse_expr(expr: str) -> pypynum.symbols.Expr
│       └── tokenize(expr: str) -> list
├── tensors
│   ├── CLASS
│   │   └── Tensor(pypynum.arrays.Array)/__init__(self: Any, data: Any, check: Any) -> Any
│   └── FUNCTION
│       ├── ten(data: list) -> pypynum.tensors.Tensor
│       └── tensor_and_number(tensor: Any, operator: Any, number: Any) -> Any
├── test
│   ├── CLASS
│   └── FUNCTION
├── this
│   ├── CLASS
│   └── FUNCTION
├── tools
│   ├── CLASS
│   └── FUNCTION
│       ├── classify(array: typing.Union[list, tuple]) -> dict
│       ├── cos_sim(seq1: typing.Union[list, tuple, str], seq2: typing.Union[list, tuple, str], is_vector: bool) -> float
│       ├── damerau(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> int
│       ├── dedup(iterable: typing.Union[list, tuple, str]) -> typing.Union[list, tuple, str]
│       ├── fast_pow(a: typing.Any, n: int, init: typing.Any, mul: typing.Callable) -> typing.Any
│       ├── findall(seq: typing.Union[list, tuple, str], pat: typing.Union[list, tuple, str]) -> list
│       ├── frange(start: typing.Union[int, float], stop: typing.Union[int, float], step: float) -> list
│       ├── geomspace(start: typing.Union[int, float], stop: typing.Union[int, float], number: int) -> list
│       ├── kmp_table(pattern: typing.Union[list, tuple, str]) -> list
│       ├── lcsubseq(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> list
│       ├── lcsubstr(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> list
│       ├── levenshtein(x: typing.Union[list, tuple, str], y: typing.Union[list, tuple, str]) -> int
│       ├── linspace(start: typing.Union[int, float], stop: typing.Union[int, float], number: int) -> list
│       ├── lstrip(sequence: typing.Any, keys: typing.Any) -> typing.Any
│       ├── magic_square(n: int) -> list
│       ├── primality(n: int, iter_num: int) -> bool
│       ├── prime_factors(integer: int, dictionary: bool, pollard_rho: bool) -> typing.Union[list, dict]
│       ├── primes(limit: int) -> list
│       ├── replace(seq: typing.Union[list, tuple], old: typing.Union[list, tuple], new: typing.Union[list, tuple], count: int) -> typing.Union[list, tuple]
│       ├── rstrip(sequence: typing.Any, keys: typing.Any) -> typing.Any
│       ├── semiprimes(limit: int) -> list
│       ├── split(iterable: typing.Union[list, tuple, str], key: typing.Union[list, tuple], retain: bool) -> list
│       ├── strip(sequence: typing.Any, keys: typing.Any) -> typing.Any
│       ├── strip_helper(sequence: typing.Any, keys_set: set, strip_start: bool, strip_end: bool) -> typing.Any
│       └── twinprimes(limit: int) -> list
├── trees
│   ├── CLASS
│   │   ├── BTNode(object)/__init__(self: Any, data: Any) -> Any
│   │   ├── BinaryTree(object)/__init__(self: Any, root: Any) -> Any
│   │   ├── MTNode(object)/__init__(self: Any, data: Any) -> Any
│   │   ├── MultiTree(object)/__init__(self: Any, root: Any) -> Any
│   │   ├── RBTNode(object)/__init__(self: Any, data: Any, color: Any) -> Any
│   │   └── RedBlackTree(object)/__init__(self: Any) -> Any
│   └── FUNCTION
├── types
│   ├── CLASS
│   └── FUNCTION
├── ufuncs
│   ├── CLASS
│   └── FUNCTION
│       ├── _beta_scalar(a: Any, b: Any) -> Any
│       ├── _binomial_scalar(n: Any, k: Any) -> Any
│       ├── _factorial_scalar(n: Any) -> Any
│       ├── _lanczos_sum(z: Any) -> Any
│       ├── _log_sin_pi(z: Any) -> Any
│       ├── _logbeta_scalar(a: Any, b: Any) -> Any
│       ├── _logfactorial_scalar(n: Any) -> Any
│       ├── _pochhammer_scalar(a: Any, n: Any) -> Any
│       ├── _scalar_gamma(z: Any) -> Any
│       ├── _scalar_loggamma(z: Any) -> Any
│       ├── add(x: Any, y: Any) -> Any
│       ├── apply(a: Any, func: Any, rtype: Any, dtype: Any) -> Any
│       ├── base_ufunc(arrays: Any, func: Any, args: Any, rtype: Any, dtype: Any) -> Any
│       ├── beta(a: Any, b: Any) -> Any
│       ├── binomial(n: Any, k: Any) -> Any
│       ├── divide(x: Any, y: Any) -> Any
│       ├── equal(x: Any, y: Any) -> Any
│       ├── factorial(n: Any) -> Any
│       ├── floor_divide(x: Any, y: Any) -> Any
│       ├── gamma(z: Any) -> Any
│       ├── greater_equal(x: Any, y: Any) -> Any
│       ├── greater_than(x: Any, y: Any) -> Any
│       ├── less_equal(x: Any, y: Any) -> Any
│       ├── less_than(x: Any, y: Any) -> Any
│       ├── logbeta(a: Any, b: Any) -> Any
│       ├── logfactorial(n: Any) -> Any
│       ├── loggamma(z: Any) -> Any
│       ├── modulo(x: Any, y: Any) -> Any
│       ├── multiply(x: Any, y: Any) -> Any
│       ├── not_equal(x: Any, y: Any) -> Any
│       ├── pochhammer(a: Any, n: Any) -> Any
│       ├── power(x: Any, y: Any, m: Any) -> Any
│       ├── subtract(x: Any, y: Any) -> Any
│       └── ufunc_helper(x: Any, y: Any, func: Any, rtype: Any, dtype: Any) -> Any
├── utils
│   ├── CLASS
│   │   ├── InfIterator(object)/__init__(self: Any, start: typing.Union[int, float, complex], mode: str, common: typing.Union[int, float, complex]) -> Any
│   │   ├── IntervalSet(object)/__init__(self: Any, intervals: Any) -> Any
│   │   ├── LinkedList(object)/__init__(self: Any) -> Any
│   │   ├── LinkedListNode(object)/__init__(self: Any, value: Any, next_node: Any) -> Any
│   │   ├── OrderedSet(object)/__init__(self: Any, sequence: Any) -> Any
│   │   └── RadixInt(object)/__init__(self: Any, number: Any, base: Any) -> Any
│   └── FUNCTION
├── vectors
│   ├── CLASS
│   │   └── Vector(pypynum.arrays.Array)/__init__(self: Any, data: Any, check: Any, dtype: Any) -> Any
│   └── FUNCTION
│       └── vec(data: Any) -> Any
└── zh_cn
    ├── CLASS
    └── FUNCTION

Code Testing

from pypynum import (arrays, geoms, hypcmpnms, logics, matrices, multiprec, polys, special, vectors, ciphers, consts,
                     equations, maths, plotting, random, regs, tools, ufuncs)

...

print(arrays.array())
print(arrays.array([1, 2, 3, 4, 5, 6, 7, 8]))
print(arrays.array([[1, 2, 3, 4], [5, 6, 7, 8]]))
print(arrays.array([[[1, 2], [3, 4]], [[5, 6], [7, 8]]]))

"""
[]
[1 2 3 4 5 6 7 8]
[[1 2 3 4]
 [5 6 7 8]]
[[[1 2]
  [3 4]]

 [[5 6]
  [7 8]]]
"""

triangle = geoms.Triangle((0, 0), (2, 2), (3, 0))
print(triangle.perimeter())
print(triangle.area())
print(triangle.centroid())

"""
8.06449510224598
3.0
(1.6666666666666667, 0.6666666666666666)
"""

q0 = hypcmpnms.quat(1, 2, 3, 4)
q1 = hypcmpnms.quat(5, 6, 7, 8)
print(q0)
print(q1)
print(q0 + q1)
print(q0 * q1)
print(q0.inverse())
print(q1.conjugate())

"""
(1+2i+3j+4k)
(5+6i+7j+8k)
(6+8i+10j+12k)
(-60+12i+30j+24k)
(0.03333333333333333-0.06666666666666667i-0.1j-0.13333333333333333k)
(5-6i-7j-8k)
"""

a, b, c = 1, 1, 1
adder0, adder1 = logics.HalfAdder("alpha", a, b), logics.HalfAdder("beta", c, None)
xor0 = logics.XOR("alpha")
ff0, ff1 = logics.DFF("alpha"), logics.DFF("beta")
xor0.set_order0(1)
xor0.set_order1(1)
logics.connector(adder0, adder1)
logics.connector(adder0, xor0)
logics.connector(adder1, xor0)
logics.connector(adder1, ff0)
logics.connector(xor0, ff1)
print("sum: {}, carry: {}".format(ff0.out(), ff1.out()))

"""
sum: [1], carry: [1]
"""

m0 = matrices.mat([[1, 2], [3, 4]])
m1 = matrices.mat([[5, 6], [7, 8]])
print(m0)
print(m1)
print(m0 + m1)
print(m0 @ m1)
print(m0.inv())
print(m1.rank())

"""
[[1 2]
 [3 4]]
[[5 6]
 [7 8]]
[[ 6  8]
 [10 12]]
[[19 22]
 [43 50]]
[[ -1.9999999999999996   0.9999999999999998]
 [  1.4999999999999998 -0.49999999999999994]]
2
"""

mp_complex1 = multiprec.MPComplex("1.4142135623730950488016887242096980785696718753769",
                                  "2.7182818284590452353602874713527", sigfigs=30)
mp_complex2 = multiprec.MPComplex("1.7320508075688772935274463415059",
                                  "3.141592653589793238462643383279502884197169399375105820974944", sigfigs=40)
modulus = mp_complex1.modulus(sigfigs=25)
print("Modulus of the complex1:", modulus)
sqrt_complex = mp_complex2.sqrt()
print("Square root of the complex2:", sqrt_complex)
power_result = mp_complex1 ** mp_complex2
print("Power of complex1 raised to complex2:", power_result)
euler_gamma = multiprec.mp_euler_gamma(sigfigs=45)
print("Value of Euler's gamma constant:", euler_gamma)
log_2 = multiprec.mp_log(2, 10, sigfigs=50)
print("Logarithm of 2 (base 10):", log_2)
exp_e_squared = multiprec.mp_exp(multiprec.mp_e() ** 2, sigfigs=20)
print("Value of exp(e^2):", exp_e_squared)

"""
Modulus of the complex1: 3.064156670102011971734464
Square root of the complex2: 1.630869996965458756791024890326755654659+0.9631646481434200567938527724670041364524i
Power of complex1 raised to complex2: 0.144632311554759549910373681032-0.17337039786352194417298867399i
Value of Euler's gamma constant: 0.577215664901532860606512090082402431042159336
Logarithm of 2 (base 10): 0.30102999566398119521373889472449302676818988146211
Value of exp(e^2): 1618.1779919126535017
"""

p0 = polys.poly([(2, 1), (1, -2), (0, 1)])
p1 = polys.poly([(1, 1), (0, -1)])
print(p0)
print(p1)
print(p0 + p1)
print(p0 * p1)
print(p0.deriv())
print(p0.integ())
print(p0.roots())
print(p0.gcd(p1))
print(polys.legpoly(3))
print(polys.chebpoly(3))

"""
1 - 2x + x^2
-1 + x
-x + x^2
-1 + 3x - 3x^2 + x^3
-2 + 2x
x - x^2 + 0.3333333333333333x^3
[0.9999999999999998, 0.9999999999999999]
-1 + x
-1.5x + 2.5x^3
-3x + 4x^3
"""

print("Bessel Function of the first kind, order 0 at x=1:", special.besselj0(1))
print("Modified Bessel function of the first kind, order 1 at x=1:", special.besseli1(1))
print("Hypergeometric function 0F1 at z=0.5 with b0=1:", special.hyp0f1(1, 0.5))
print("Hypergeometric function 1F1 at z=1 with a0=1, b0=1:", special.hyp1f1(1, 1, 1))
print("q-Pochhammer Symbol with a=2+1j, q=0.5+0.1j, n=2+1j:", special.qpochhammer(2 + 1j, 0.5 + 0.1j, 2 + 1j))
print("q-Gamma Function at n=2 with q=0.5+0.1j:", special.qgamma(2, 0.5 + 0.1j))

"""
Bessel Function of the first kind, order 0 at x=1: 0.7651976865579666
Modified Bessel function of the first kind, order 1 at x=1: 0.565159103992485
Hypergeometric function 0F1 at z=0.5 with b0=1: 1.5660829297563503
Hypergeometric function 1F1 at z=1 with a0=1, b0=1: 2.7182818284590455
q-Pochhammer Symbol with a=2+1j, q=0.5+0.1j, n=2+1j: (-0.3335342940577659+1.8573191887407858j)
q-Gamma Function at n=2 with q=0.5+0.1j: (0.9999999999999989-4.953510875709033e-16j)
"""

string = "PyPyNum"
encrypted = ciphers.caesar(string, 10)
print(string)
print(encrypted)
print(ciphers.caesar(encrypted, 10, decrypt=True))
encrypted = ciphers.vigenere(string, "ciphers")
print(string)
print(encrypted)
print(ciphers.vigenere(encrypted, "ciphers", decrypt=True))
encrypted = ciphers.morse(string)
print(string)
print(encrypted)
print(ciphers.morse(encrypted, decrypt=True))

"""
PyPyNum
ZiZiXew
PyPyNum
PyPyNum
RgEfRle
PyPyNum
PyPyNum
.--. -.-- .--. -.-- -. ..- --
PYPYNUM
"""

v0 = vectors.vec([1, 2, 3, 4])
v1 = vectors.vec([5, 6, 7, 8])
print(v0)
print(v1)
print(v0 + v1)
print(v0 @ v1)
print(v0.normalize())
print(v1.angles())

"""
[1 2 3 4]
[5 6 7 8]
[ 5 12 21 32]
70
[0.18257418583505536  0.3651483716701107  0.5477225575051661  0.7302967433402214]
[1.1820279130506308, 1.0985826410133916, 1.0114070854293842, 0.9191723423169716]
"""

print(consts.TB)
print(consts.e)
print(consts.h)
print(consts.phi)
print(consts.pi)
print(consts.tera)

"""
1099511627776
2.718281828459045
6.62607015e-34
1.618033988749895
3.141592653589793
1000000000000
"""

p = [1, -2, -3, 4]
m = [
    [
        [1, 2, 3],
        [6, 10, 12],
        [7, 16, 9]
    ],
    [-1, -2, -3]
]
print(equations.poly_eq(p))
print(equations.lin_eq(*m))

"""
[(-1.5615528128088307-3.728101026218476e-24j), (1.0000000000000007+3.2415545137443745e-25j), (2.5615528128088294+7.352235277305158e-24j)]
[ 1.6666666666666665 -0.6666666666666666 -0.4444444444444444]
"""

print(maths.cot(consts.pi / 3))
print(maths.combination(10, 3))
print(maths.pi(1, 10, lambda x: x ** 2))
print(maths.product([2, 3, 5, 7, 11, 13, 17, 19, 23, 29]))
print(maths.sigma(1, 10, lambda x: x ** 2))
print(maths.var([2, 3, 5, 7, 11, 13, 17, 19, 23, 29]))

"""
0.577350269189626
120
13168189440000
6469693230
385
73.29
"""

print("Scalar gamma(5):", ufuncs.gamma(5))
print("Complex gamma(1+1j):", ufuncs.gamma(1 + 1j))
print("Array gamma:", ufuncs.gamma(arrays.array([1, 2, 3, 4, 5])))
print("Scalar factorial(10):", ufuncs.factorial(10))
print("Array factorial:", ufuncs.factorial(arrays.array([1, 2, 3, 4, 5])))
print("Scalar binomial(10, 3):", ufuncs.binomial(10, 3))
print("Complex binomial(5+1j, 2+1j):", ufuncs.binomial(5 + 1j, 2 + 1j))
print("Array binomial:", ufuncs.binomial(arrays.array([5, 6, 7]), arrays.array([2, 3, 4])))
print("Scalar beta(2, 3):", ufuncs.beta(2, 3))
print("Complex beta(1+1j, 2+1j):", ufuncs.beta(1 + 1j, 2 + 1j))
print("Scalar pochhammer(2, 3):", ufuncs.pochhammer(2, 3))
print("Array loggamma:", ufuncs.loggamma(arrays.array([2, 3, 4, 5])))

"""
Scalar gamma(5): 24.0
Complex gamma(1+1j): (0.49801566811835757-0.15494982830181106j)
Array gamma: [ 1.0  1.0  2.0  6.0 24.0]
Scalar factorial(10): 3628800.0
Array factorial: [  1.0   2.0   6.0  24.0 120.0]
Scalar binomial(10, 3): 119.99999999999987
Complex binomial(5+1j, 2+1j): (7.999999999999997+7.6666666666666625j)
Array binomial: [10.000000000000002 20.000000000000007  35.00000000000001]
Scalar beta(2, 3): 0.08333333333333337
Complex beta(1+1j, 2+1j): (-0.10563618646826745-0.3827641582689022j)
Scalar pochhammer(2, 3): 24.0
Array loggamma: [               0.0  0.693147180559945 1.7917594692280554  3.178053830347945]
"""

canvas = plotting.Canvas(xlim=(0, 10), ylim=(0, 10), resolution=50)
canvas.plot(lambda x: x ** 2, marker="+")
print(canvas.render())
canvas2 = plotting.Canvas(xlim=(-5, 5), ylim=(-5, 5), resolution=60)
canvas2.plot_contour(lambda x, y: maths.sin(x ** 2) + maths.sin(y ** 2), threshold=0, marker="*")
print(canvas2.render())
canvas3 = plotting.Canvas(xlim=(-2, 2), ylim=(-2, 2), resolution=40)
canvas3.plot_complex(lambda z: z ** z, marker="-")
print(canvas3.render())

"""
  1.00e+01|                +                                  
          |                                                   
          |               +                                   
          |                                                   
          |              +                                    
          |                                                   
          |             +                                     
          |            +                                      
  5.00e+00|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
          |           +                                       
          |          +                                        
          |         +                                         
          |                                                   
          |        +                                          
          |       +                                           
          |     ++                                            
          |   ++                                              
  0.00e+00|+++________________________________________________
           0.00e+00              5.00e+00             1.00e+01
  5.00e+00|  *** ****  ****    *********   *********    ****  **** ***  
          |************* ********   ***********   ******** *************
          |*************************************************************
          |*************************************************************
          |**********************  *************  **********************
          |*************************************************************
          |  *** ****  ****   ***********************   ****  **** ***  
          |*** ***  ****  *****                     *****  ****  *** ***
          |**  ***  ***    ***                       ***    ***  ***  **
          |*** * *  * **  ** **                     ** **  ** *  * * ***
  0.00e+00|_ * * * _*_ * _*_ _*_ _ _ _ _ * _ _ _ _ _*_ _*_ * _*_ * * * _
          |*** * *  * **  ** **                     ** **  ** *  * * ***
          |**  ***  ***    ***                       ***    ***  ***  **
          |*** ***  ****  *****                     *****  ****  *** ***
          |  *** ****  ****   ***********************   ****  **** ***  
          |*************************************************************
          |**********************  *************  **********************
          |*************************************************************
          |*************************************************************
          |************* ********   ***********   ******** *************
 -5.00e+00|__***_****__****____*********___*********____****__****_***__
           -5.00e+00                  0.00e+00                  5.00e+00
  2.00e+00|                -           -            
          |-                -         -            -
          |     -  -          --      -       -  -  
          |           - -      --    -       -      
          |     -         ---- ---- --    --        
          |      - ---- ------------- ----     - -  
  0.00e+00|_ _-_ _ _ _-_-------------------- - _ _ _
          |   -       - -------------------- -      
          |      - ---- ------------- ----     - -  
          |     -         ---- ---- --    --        
          |           - -      --    -       -      
          |     -  -          --      -       -  -  
          |-                -         -            -
 -2.00e+00|________________-___________-____________
           -2.00e+00     -  0.00e+00   -    2.00e+00
"""

print(random.gauss(0, 1, [2, 3, 4]))
print(random.rand([2, 3, 4]))
print(random.randint(0, 9, [2, 3, 4]))
print(random.uniform(0, 9, [2, 3, 4]))

"""
[[[-0.1298501384051712, 0.3727699801277098, 0.4166700916648799, -0.7775206291555409], [-0.30014656405123064, -0.16697588134574046, 0.05882136579879377, -1.3702698211987647], [0.6197659045003135, 1.991697529996604, 0.9298444669920536, 0.4422044574065226]], [[-1.0421887750231207, 1.0127464645610977, -0.19182259386341258, -0.005000095322641637], [-0.9920550978825892, -0.10153125400742637, -0.10261269275330637, 0.14806319544548724], [-0.4828220202617309, -1.1860880232637627, -2.0699004045058267, -0.529540752082409]]]
[[[0.08655140967833264, 0.6394780807323993, 0.2524438881598683, 0.6474199226773842], [0.5756049932474537, 0.5282380647601147, 0.7316894682109464, 0.019931361163881167], [0.7159100626981946, 0.9890997667800252, 0.07139958022635717, 0.41108364623335725]], [[0.3968800554375378, 0.2991796674738614, 0.6018719095232256, 0.8784654982369239], [0.4686461866479704, 0.590160413315007, 0.8152095317051954, 0.27473954566778025], [0.4442862079226716, 0.9497328028804668, 0.024900765451991935, 0.6874120115820541]]]
[[[1, 2, 1, 8], [7, 5, 6, 4], [7, 2, 0, 3]], [[4, 7, 5, 9], [6, 5, 7, 7], [9, 7, 9, 7]]]
[[[8.03159946997718, 0.6986351746766797, 6.257222546262797, 0.201624984908367], [1.5010606332093606, 8.490949276137348, 2.801498207055703, 1.6336744885080783], [3.940481233427212, 7.308098296419055, 2.025878540098897, 8.64457791957968]], [[6.154491182321485, 0.7269750156678364, 2.5524453548150046, 0.9963287593978754], [7.233834593868724, 8.238488157751819, 5.011182865628198, 1.7274625227896652], [2.378375506221915, 7.213742910935083, 2.705310847444149, 6.1706150877584705]]]
"""

print(regs.lin_reg(list(range(5)), [2, 4, 6, 7, 8]))
print(regs.par_reg(list(range(5)), [2, 4, 6, 7, 8]))
print(regs.poly_reg(list(range(5)), [2, 4, 6, 7, 8], 4))

"""
[1.5, 2.4000000000000004]
[-0.21428571428571563, 2.3571428571428625, 1.971428571428569]
[0.08333333333320592, -0.666666666666571, 1.4166666666628345, 1.1666666666688208, 1.9999999999999258]
"""

print(tools.classify([1, 2.3, 4 + 5j, "string", list, True, 3.14, False, tuple, tools]))
print(tools.dedup(["Python", 6, "NumPy", int, "PyPyNum", 9, "pypynum", "NumPy", 6, True]))
print(tools.frange(0, 3, 0.4))
print(tools.linspace(0, 2.8, 8))

"""
{<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 'C:\\Users\\Administrator\\PycharmProjects\\PythonProject\\pypynum\\tools.py'>]}
['Python', 6, 'NumPy', <class 'int'>, 'PyPyNum', 9, 'pypynum', True]
[0.0, 0.4, 0.8, 1.2000000000000002, 1.6, 2.0, 2.4000000000000004, 2.8000000000000003, 3.2]
[0.0, 0.39999999999999997, 0.7999999999999999, 1.2, 1.5999999999999999, 1.9999999999999998, 2.4, 2.8]
"""

# Tip: 
# The test has been successfully passed and ended. 
# These tests are only part of the functionality of this package. 
# More features need to be explored and tried by yourself! 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypynum-1.19.0.tar.gz (191.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypynum-1.19.0-py3-none-any.whl (183.0 kB view details)

Uploaded Python 3

File details

Details for the file pypynum-1.19.0.tar.gz.

File metadata

  • Download URL: pypynum-1.19.0.tar.gz
  • Upload date:
  • Size: 191.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pypynum-1.19.0.tar.gz
Algorithm Hash digest
SHA256 8bc3b600b0483950fb08c3efcdc2ad24b337f2bbb70d19245d3336f6c439e86f
MD5 b0d911f9399f9f0e6b95d06fa9c4c262
BLAKE2b-256 76409d6b46aa366b3852e254da15a0cd54e53ae21649d913d33fbe6c97d06b4c

See more details on using hashes here.

File details

Details for the file pypynum-1.19.0-py3-none-any.whl.

File metadata

  • Download URL: pypynum-1.19.0-py3-none-any.whl
  • Upload date:
  • Size: 183.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pypynum-1.19.0-py3-none-any.whl
Algorithm Hash digest
SHA256 04e6220085bafb6405696d39553ccdf962540be0a84f1aea694b1f14f66d07be
MD5 57d300ad52fde21820d51ad6d206071a
BLAKE2b-256 2ea883399f85bf59960d829e83ec495914e07577f156a6c148daeef5f1f97730

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page