pymath2026 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pymath2026-0.1.0/LICENSE +22 -0
- pymath2026-0.1.0/PKG-INFO +35 -0
- pymath2026-0.1.0/README.md +1 -0
- pymath2026-0.1.0/pymath2026/__init__.py +5 -0
- pymath2026-0.1.0/pymath2026/core.py +39 -0
- pymath2026-0.1.0/pymath2026.egg-info/PKG-INFO +35 -0
- pymath2026-0.1.0/pymath2026.egg-info/SOURCES.txt +10 -0
- pymath2026-0.1.0/pymath2026.egg-info/dependency_links.txt +1 -0
- pymath2026-0.1.0/pymath2026.egg-info/requires.txt +1 -0
- pymath2026-0.1.0/pymath2026.egg-info/top_level.txt +1 -0
- pymath2026-0.1.0/pyproject.toml +19 -0
- pymath2026-0.1.0/setup.cfg +4 -0
pymath2026-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 kksk
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pymath2026
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Sympy extension: Mellin transform and math utilities
|
|
5
|
+
Author: kksk
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 kksk
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
Requires-Python: >=3.9
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
License-File: LICENSE
|
|
32
|
+
Requires-Dist: sympy>=1.12
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
空
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
空
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import sympy as sp
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def mellin_transform(f: sp.Expr, x: sp.Symbol, s: sp.Symbol) -> sp.Expr:
|
|
5
|
+
r"""
|
|
6
|
+
梅林变换
|
|
7
|
+
Mellin transform
|
|
8
|
+
.. math::
|
|
9
|
+
\mathcal{M}[f](s) = \int_{0}^{+\infty} x^{s-1} f(x)\,\mathrm{d}x
|
|
10
|
+
|
|
11
|
+
Parameters
|
|
12
|
+
----------
|
|
13
|
+
f : sympy.Expr
|
|
14
|
+
x : sympy.Symbol
|
|
15
|
+
s : sympy.Symbol
|
|
16
|
+
|
|
17
|
+
Returns
|
|
18
|
+
-------
|
|
19
|
+
sympy.Expr
|
|
20
|
+
May return unevaluated Integral for complicated functions.
|
|
21
|
+
"""
|
|
22
|
+
integrand = x ** (s - 1) * f
|
|
23
|
+
return sp.integrate(integrand, (x, 0, sp.oo))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def inverse_mellin_transform(F: sp.Expr, s: sp.Symbol, x: sp.Symbol, c: float):
|
|
27
|
+
r"""
|
|
28
|
+
逆梅林变换
|
|
29
|
+
Formal inverse Mellin transform.
|
|
30
|
+
Note: Sympy rarely can evaluate this symbolically, use residue manually.
|
|
31
|
+
|
|
32
|
+
.. math::
|
|
33
|
+
f(x)=\frac{1}{2\pi i}\int_{c-i\infty}^{c+i\infty} x^{-s}F(s)\,\mathrm{d}s
|
|
34
|
+
"""
|
|
35
|
+
t = sp.Symbol("t", real=True)
|
|
36
|
+
subs_expr = F.subs(s, c + sp.I * t)
|
|
37
|
+
integrand = x ** (-(c + sp.I * t)) * subs_expr
|
|
38
|
+
return 1/(2*sp.pi*sp.I) * sp.integrate(integrand, (t, -sp.oo, sp.oo))
|
|
39
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pymath2026
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Sympy extension: Mellin transform and math utilities
|
|
5
|
+
Author: kksk
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 kksk
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
Requires-Python: >=3.9
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
License-File: LICENSE
|
|
32
|
+
Requires-Dist: sympy>=1.12
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
空
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
pymath2026/__init__.py
|
|
5
|
+
pymath2026/core.py
|
|
6
|
+
pymath2026.egg-info/PKG-INFO
|
|
7
|
+
pymath2026.egg-info/SOURCES.txt
|
|
8
|
+
pymath2026.egg-info/dependency_links.txt
|
|
9
|
+
pymath2026.egg-info/requires.txt
|
|
10
|
+
pymath2026.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sympy>=1.12
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pymath2026
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pymath2026"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name="kksk" }
|
|
10
|
+
]
|
|
11
|
+
description = "Sympy extension: Mellin transform and math utilities"
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
license = {file="LICENSE"}
|
|
14
|
+
requires-python = ">=3.9"
|
|
15
|
+
dependencies = [
|
|
16
|
+
"sympy>=1.12"
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
|