DGCV 0.2.4__tar.gz → 0.2.6__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.
Potentially problematic release.
This version of DGCV might be problematic. Click here for more details.
- {dgcv-0.2.4/src/DGCV.egg-info → dgcv-0.2.6}/PKG-INFO +3 -2
- {dgcv-0.2.4 → dgcv-0.2.6}/pyproject.toml +8 -4
- {dgcv-0.2.4 → dgcv-0.2.6}/setup.cfg +1 -1
- {dgcv-0.2.4 → dgcv-0.2.6}/setup.py +1 -1
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/CRGeometry.py +51 -56
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/DGCVCore.py +1729 -2930
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/DGCVFormatter.py +5 -6
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/RiemannianGeometry.py +17 -16
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/_DGCV_display.py +68 -11
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/__init__.py +37 -70
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/_safeguards.py +2 -1
- dgcv-0.2.6/src/DGCV/_tensor_field_printers.py +318 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/combinatorics.py +114 -17
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/complexStructures.py +9 -9
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/config.py +13 -2
- dgcv-0.2.6/src/DGCV/conversions.py +330 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/coordinateMaps.py +4 -4
- dgcv-0.2.6/src/DGCV/eds.py +1994 -0
- dgcv-0.2.6/src/DGCV/filtered_structures.py +378 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/finiteDimAlgebras.py +798 -104
- dgcv-0.2.6/src/DGCV/solvers.py +109 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/styles.py +107 -4
- dgcv-0.2.6/src/DGCV/tensors.py +1170 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/vectorFieldsAndDifferentialForms.py +36 -25
- dgcv-0.2.6/src/DGCV/vmf.py +262 -0
- {dgcv-0.2.4 → dgcv-0.2.6/src/DGCV.egg-info}/PKG-INFO +3 -2
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV.egg-info/SOURCES.txt +7 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/LICENSE.txt +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/MANIFEST.in +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/README.md +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/__init__.py +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/Orbitron-Black.ttf +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/Orbitron-Black.woff2 +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/Orbitron-Bold.ttf +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/Orbitron-Bold.woff2 +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/Orbitron-ExtraBold.ttf +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/Orbitron-ExtraBold.woff2 +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/Orbitron-Medium.ttf +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/Orbitron-Medium.woff2 +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/Orbitron-Regular.ttf +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/Orbitron-Regular.woff2 +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/Orbitron-SemiBold.ttf +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/Orbitron-SemiBold.woff2 +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/PatrickHand-Regular.ttf +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/fonts/fonts.css +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/inversions/__init__.py +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/inversions/populator.ipynb +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/inversions/precomputed_2x2.py +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/inversions/precomputed_3x3.py +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/inversions/precomputed_4x4.py +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/inversions/precomputed_5x5.py +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/inversions/precomputed_6x6.py +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/assets/inversions/precomputed_7x7.py +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV/polynomials.py +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV.egg-info/dependency_links.txt +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV.egg-info/requires.txt +0 -0
- {dgcv-0.2.4 → dgcv-0.2.6}/src/DGCV.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: DGCV
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: Differential Geometry with Complex Variables
|
|
5
5
|
Author: David Sykes
|
|
6
6
|
Author-email: David Sykes <david@realandimaginary.com>
|
|
@@ -11,6 +11,7 @@ License-File: LICENSE.txt
|
|
|
11
11
|
Requires-Dist: sympy>=1.9
|
|
12
12
|
Requires-Dist: pandas>=1.0
|
|
13
13
|
Requires-Dist: ipython>=7.0
|
|
14
|
+
Dynamic: requires-python
|
|
14
15
|
|
|
15
16
|
# DGCV: Differential Geometry with Complex Variables
|
|
16
17
|
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
[project]
|
|
6
6
|
requires-python = ">=3.6"
|
|
7
7
|
name = "DGCV"
|
|
8
|
-
version = "0.2.
|
|
8
|
+
version = "0.2.6"
|
|
9
9
|
description = "Differential Geometry with Complex Variables"
|
|
10
10
|
authors = [{ name = "David Sykes", email = "david@realandimaginary.com" }]
|
|
11
11
|
license = { text = "MIT" }
|
|
@@ -14,11 +14,15 @@ readme = "README.md"
|
|
|
14
14
|
|
|
15
15
|
[tool.ruff]
|
|
16
16
|
line-length = 88
|
|
17
|
-
|
|
18
|
-
extend-exclude = ["_build", "buck-out", "build", "dist", "tutorials"]
|
|
17
|
+
extend-exclude = ["_build", "buck-out", "build", "dist", "tutorials", "*.ipynb"]
|
|
19
18
|
|
|
20
19
|
[tool.ruff.lint]
|
|
21
|
-
|
|
20
|
+
select = ["F", "E", "W", "I"] # Move linter rules to this section
|
|
21
|
+
ignore = ["E501", "Q", "W291"] # Add global ignores here if needed
|
|
22
|
+
|
|
23
|
+
# Move per-file-ignores to the lint section
|
|
24
|
+
[tool.ruff.lint.per-file-ignores]
|
|
25
|
+
"__init__.py" = ["E402"]
|
|
22
26
|
|
|
23
27
|
[tool.black]
|
|
24
28
|
line-length = 88
|
|
@@ -15,7 +15,7 @@ To get started, check out the Jupyter Notebook tutorials:
|
|
|
15
15
|
|
|
16
16
|
setup(
|
|
17
17
|
name="DGCV",
|
|
18
|
-
version="0.2.
|
|
18
|
+
version="0.2.6",
|
|
19
19
|
description="Differential Geometry with Complex Variables",
|
|
20
20
|
long_description=long_description, # This shows up on PyPI
|
|
21
21
|
long_description_content_type="text/markdown",
|
|
@@ -26,21 +26,7 @@ License:
|
|
|
26
26
|
############## dependencies
|
|
27
27
|
from functools import reduce
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
I,
|
|
31
|
-
Matrix,
|
|
32
|
-
Rational,
|
|
33
|
-
Symbol,
|
|
34
|
-
Transpose,
|
|
35
|
-
conjugate,
|
|
36
|
-
expand,
|
|
37
|
-
eye,
|
|
38
|
-
im,
|
|
39
|
-
numer,
|
|
40
|
-
poly_from_expr,
|
|
41
|
-
simplify,
|
|
42
|
-
solve,
|
|
43
|
-
)
|
|
29
|
+
import sympy as sp
|
|
44
30
|
|
|
45
31
|
from ._safeguards import retrieve_passkey
|
|
46
32
|
from .config import _cached_caller_globals
|
|
@@ -63,7 +49,7 @@ from .vectorFieldsAndDifferentialForms import assembleFromHolVFC
|
|
|
63
49
|
############## CR geometry
|
|
64
50
|
|
|
65
51
|
|
|
66
|
-
def tangencyObstruction(arg1, arg2, arg3, *args):
|
|
52
|
+
def tangencyObstruction(arg1, arg2, arg3, simplify=False, *args):
|
|
67
53
|
"""
|
|
68
54
|
Computes the tangency obstruction for a holomorphic vector field with respect to a CR hypersurface.
|
|
69
55
|
|
|
@@ -103,7 +89,12 @@ def tangencyObstruction(arg1, arg2, arg3, *args):
|
|
|
103
89
|
evaluationLoc = allToReal(realPartOfVF(arg1)(holToReal(arg3 - arg2))).subs(
|
|
104
90
|
holToReal(symToReal(arg3)), symToReal(arg2)
|
|
105
91
|
)
|
|
106
|
-
|
|
92
|
+
def simplify_rules(expr):
|
|
93
|
+
if simplify:
|
|
94
|
+
return sp.simplify(expr)
|
|
95
|
+
else:
|
|
96
|
+
return expr
|
|
97
|
+
return simplify_rules(symToReal(evaluationLoc))
|
|
107
98
|
|
|
108
99
|
|
|
109
100
|
def weightedHomogeneousVF(
|
|
@@ -175,6 +166,7 @@ def findWeightedCRSymmetries(
|
|
|
175
166
|
returnVectorFieldBasis=False,
|
|
176
167
|
applyNumer=False,
|
|
177
168
|
simplifyingFactor=None,
|
|
169
|
+
simplify=False
|
|
178
170
|
):
|
|
179
171
|
"""
|
|
180
172
|
***This function's algorithm will be revised in future updates***
|
|
@@ -204,9 +196,8 @@ def findWeightedCRSymmetries(
|
|
|
204
196
|
Raises:
|
|
205
197
|
NA
|
|
206
198
|
"""
|
|
207
|
-
|
|
208
199
|
def extractRIVar(arg1):
|
|
209
|
-
return sum([list(holToReal(j).atoms(Symbol)) for j in arg1], [])
|
|
200
|
+
return sum([list(holToReal(j).atoms(sp.Symbol)) for j in arg1], [])
|
|
210
201
|
|
|
211
202
|
VFLoc = addVF(
|
|
212
203
|
weightedHomogeneousVF(
|
|
@@ -218,9 +209,7 @@ def findWeightedCRSymmetries(
|
|
|
218
209
|
degreeCap=degreeCap,
|
|
219
210
|
assumeReal=True,
|
|
220
211
|
),
|
|
221
|
-
scaleVF(
|
|
222
|
-
I,
|
|
223
|
-
weightedHomogeneousVF(
|
|
212
|
+
scaleVF(sp.I,weightedHomogeneousVF(
|
|
224
213
|
arg2,
|
|
225
214
|
arg4,
|
|
226
215
|
arg3,
|
|
@@ -231,8 +220,8 @@ def findWeightedCRSymmetries(
|
|
|
231
220
|
),
|
|
232
221
|
),
|
|
233
222
|
)
|
|
234
|
-
tOLoc = tangencyObstruction(VFLoc, arg1, arg5, arg2)
|
|
235
|
-
varLoc = tOLoc.atoms(Symbol)
|
|
223
|
+
tOLoc = tangencyObstruction(VFLoc, arg1, arg5, arg2, simplify=simplify)
|
|
224
|
+
varLoc = tOLoc.atoms(sp.Symbol)
|
|
236
225
|
varLoc1 = {j for j in varLoc}
|
|
237
226
|
varComp = set(extractRIVar(arg2))
|
|
238
227
|
varLoc.difference_update(varComp)
|
|
@@ -242,26 +231,27 @@ def findWeightedCRSymmetries(
|
|
|
242
231
|
if applyNumer:
|
|
243
232
|
if varLoc1 == set():
|
|
244
233
|
varLoc1 = set(arg2)
|
|
245
|
-
coefListLoc = poly_from_expr(expand(numer(tOLoc)), *varLoc1)[0].coeffs()
|
|
246
|
-
solLoc = solve(coefListLoc, varLoc)
|
|
234
|
+
coefListLoc = sp.poly_from_expr(sp.expand(sp.numer(tOLoc)), *varLoc1)[0].coeffs()
|
|
235
|
+
solLoc = sp.solve(coefListLoc, varLoc)
|
|
247
236
|
elif simplifyingFactor is None:
|
|
248
237
|
if varLoc1 == set():
|
|
249
238
|
varLoc1 = set(arg2)
|
|
250
|
-
coefListLoc = poly_from_expr(expand(tOLoc), *varLoc1)[0].coeffs()
|
|
251
|
-
solLoc = solve(coefListLoc, varLoc)
|
|
239
|
+
coefListLoc = sp.poly_from_expr(sp.expand(tOLoc), *varLoc1)[0].coeffs()
|
|
240
|
+
solLoc = sp.solve(coefListLoc, varLoc)
|
|
252
241
|
else:
|
|
253
242
|
if varLoc1 == set():
|
|
254
243
|
varLoc1 = set(arg2)
|
|
255
|
-
|
|
256
|
-
|
|
244
|
+
|
|
245
|
+
coefListLoc = sp.poly_from_expr(
|
|
246
|
+
sp.expand(simplify(symToReal(simplifyingFactor) * tOLoc)), *varLoc1
|
|
257
247
|
)[0].coeffs()
|
|
258
|
-
solLoc = solve(coefListLoc, varLoc)
|
|
248
|
+
solLoc = sp.solve(coefListLoc, varLoc)
|
|
259
249
|
if solLoc == []:
|
|
260
250
|
clearVar(*listVar(temporary_only=True), report=False)
|
|
261
251
|
return "no solution"
|
|
262
252
|
elif type(solLoc) is dict:
|
|
263
253
|
VFCLoc = [j.subs(solLoc) for j in holVF_coeffs(VFLoc, arg2)]
|
|
264
|
-
subVar = sum(VFCLoc).atoms(Symbol)
|
|
254
|
+
subVar = sum(VFCLoc).atoms(sp.Symbol)
|
|
265
255
|
subVar.difference_update(set(arg2))
|
|
266
256
|
variableProcedure(arg6, len(subVar), assumeReal=True)
|
|
267
257
|
VFCLoc = [
|
|
@@ -285,7 +275,7 @@ def findWeightedCRSymmetries(
|
|
|
285
275
|
return VFCLoc
|
|
286
276
|
else:
|
|
287
277
|
VFCLoc = holVF_coeffs(VFLoc, arg2)
|
|
288
|
-
subVar = sum(VFCLoc).atoms(Symbol)
|
|
278
|
+
subVar = sum(VFCLoc).atoms(sp.Symbol)
|
|
289
279
|
subVar.difference_update(set(arg2))
|
|
290
280
|
variableProcedure(arg6, len(subVar), assumeReal=True)
|
|
291
281
|
VFCLoc = [
|
|
@@ -296,7 +286,7 @@ def findWeightedCRSymmetries(
|
|
|
296
286
|
return VFCLoc, solLoc
|
|
297
287
|
|
|
298
288
|
|
|
299
|
-
def model2Nondegenerate(arg1, arg2, arg3, arg4, return_matrices=False):
|
|
289
|
+
def model2Nondegenerate(arg1, arg2, arg3, arg4, return_matrices=False, simplify=True):
|
|
300
290
|
"""
|
|
301
291
|
Builds the defining equation for a 2-nondegnerate model hypersurface using the general formula from the arXiv preprint arXiv:2404.06525.
|
|
302
292
|
|
|
@@ -312,50 +302,55 @@ def model2Nondegenerate(arg1, arg2, arg3, arg4, return_matrices=False):
|
|
|
312
302
|
Raises:
|
|
313
303
|
NA
|
|
314
304
|
"""
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
305
|
+
def simplify_rules(expr):
|
|
306
|
+
if simplify:
|
|
307
|
+
return sp.simplify(expr)
|
|
308
|
+
else:
|
|
309
|
+
return expr
|
|
310
|
+
BARSLoc = sp.conjugate(arg2)
|
|
311
|
+
zVecLoc = sp.Matrix(arg3)
|
|
312
|
+
bzVecLoc = sp.Matrix([sp.conjugate(j) for j in arg3])
|
|
318
313
|
sizeLoc = arg1.shape[0]
|
|
319
|
-
hFun = (Rational(1, 2)) * (
|
|
320
|
-
(arg1 * (eye(sizeLoc) - (BARSLoc * Transpose(arg1) * arg2 * arg1)) ** (-1))
|
|
321
|
-
+ ((eye(sizeLoc) - (arg1 * BARSLoc * Transpose(arg1) * arg2)) ** (-1) * arg1)
|
|
314
|
+
hFun = (sp.Rational(1, 2)) * (
|
|
315
|
+
(arg1 * (sp.eye(sizeLoc) - (BARSLoc * sp.Transpose(arg1) * arg2 * arg1)) ** (-1))
|
|
316
|
+
+ ((sp.eye(sizeLoc) - (arg1 * BARSLoc * sp.Transpose(arg1) * arg2)) ** (-1) * arg1)
|
|
322
317
|
)
|
|
323
318
|
sFun = (
|
|
324
319
|
arg1
|
|
325
|
-
* ((eye(sizeLoc) - (BARSLoc * Transpose(arg1) * arg2 * arg1)) ** (-1))
|
|
320
|
+
* ((sp.eye(sizeLoc) - (BARSLoc * sp.Transpose(arg1) * arg2 * arg1)) ** (-1))
|
|
326
321
|
* BARSLoc
|
|
327
|
-
* Transpose(arg1)
|
|
322
|
+
* sp.Transpose(arg1)
|
|
328
323
|
)
|
|
329
324
|
bsFun = (
|
|
330
|
-
Transpose(arg1)
|
|
331
|
-
* ((eye(sizeLoc) - (arg2 * arg1 * BARSLoc * Transpose(arg1))) ** (-1))
|
|
325
|
+
sp.Transpose(arg1)
|
|
326
|
+
* ((sp.eye(sizeLoc) - (arg2 * arg1 * BARSLoc * sp.Transpose(arg1))) ** (-1))
|
|
332
327
|
* arg2
|
|
333
328
|
* arg1
|
|
334
329
|
)
|
|
335
330
|
if return_matrices:
|
|
336
331
|
return (
|
|
337
|
-
|
|
332
|
+
simplify_rules(
|
|
338
333
|
(
|
|
339
|
-
Transpose(zVecLoc) * hFun * bzVecLoc
|
|
340
|
-
+ (Rational(1, 2))
|
|
334
|
+
sp.Transpose(zVecLoc) * hFun * bzVecLoc
|
|
335
|
+
+ (sp.Rational(1, 2))
|
|
341
336
|
* (
|
|
342
|
-
Transpose(zVecLoc) * sFun * zVecLoc
|
|
343
|
-
+ Transpose(bzVecLoc) * bsFun * bzVecLoc
|
|
337
|
+
sp.Transpose(zVecLoc) * sFun * zVecLoc
|
|
338
|
+
+ sp.Transpose(bzVecLoc) * bsFun * bzVecLoc
|
|
344
339
|
)
|
|
345
340
|
)[0]
|
|
346
341
|
)
|
|
347
|
-
- im(arg4),
|
|
342
|
+
- sp.im(arg4),
|
|
348
343
|
hFun,
|
|
349
344
|
sFun,
|
|
350
345
|
)
|
|
351
346
|
else:
|
|
352
|
-
return
|
|
347
|
+
return simplify_rules(
|
|
353
348
|
(
|
|
354
|
-
Transpose(zVecLoc) * hFun * bzVecLoc
|
|
355
|
-
+ (Rational(1, 2))
|
|
349
|
+
sp.Transpose(zVecLoc) * hFun * bzVecLoc
|
|
350
|
+
+ (sp.Rational(1, 2))
|
|
356
351
|
* (
|
|
357
|
-
Transpose(zVecLoc) * sFun * zVecLoc
|
|
358
|
-
+ Transpose(bzVecLoc) * bsFun * bzVecLoc
|
|
352
|
+
sp.Transpose(zVecLoc) * sFun * zVecLoc
|
|
353
|
+
+ sp.Transpose(bzVecLoc) * bsFun * bzVecLoc
|
|
359
354
|
)
|
|
360
355
|
)[0]
|
|
361
|
-
) - im(arg4)
|
|
356
|
+
) - sp.im(arg4)
|