DGCV 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of DGCV might be problematic. Click here for more details.

Files changed (50) hide show
  1. {dgcv-0.2.1/src/DGCV.egg-info → dgcv-0.2.2}/PKG-INFO +2 -2
  2. {dgcv-0.2.1 → dgcv-0.2.2}/README.md +1 -1
  3. {dgcv-0.2.1 → dgcv-0.2.2}/pyproject.toml +1 -1
  4. {dgcv-0.2.1 → dgcv-0.2.2}/setup.cfg +1 -1
  5. {dgcv-0.2.1 → dgcv-0.2.2}/setup.py +1 -1
  6. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/RiemannianGeometry.py +49 -18
  7. {dgcv-0.2.1 → dgcv-0.2.2/src/DGCV.egg-info}/PKG-INFO +2 -2
  8. {dgcv-0.2.1 → dgcv-0.2.2}/LICENSE.txt +0 -0
  9. {dgcv-0.2.1 → dgcv-0.2.2}/MANIFEST.in +0 -0
  10. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/CRGeometry.py +0 -0
  11. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/DGCVFormatter.py +0 -0
  12. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/DGCV_display.py +0 -0
  13. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/__init__.py +0 -0
  14. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/_safeguards.py +0 -0
  15. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/__init__.py +0 -0
  16. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/Orbitron-Black.ttf +0 -0
  17. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/Orbitron-Black.woff2 +0 -0
  18. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/Orbitron-Bold.ttf +0 -0
  19. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/Orbitron-Bold.woff2 +0 -0
  20. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/Orbitron-ExtraBold.ttf +0 -0
  21. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/Orbitron-ExtraBold.woff2 +0 -0
  22. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/Orbitron-Medium.ttf +0 -0
  23. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/Orbitron-Medium.woff2 +0 -0
  24. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/Orbitron-Regular.ttf +0 -0
  25. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/Orbitron-Regular.woff2 +0 -0
  26. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/Orbitron-SemiBold.ttf +0 -0
  27. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/Orbitron-SemiBold.woff2 +0 -0
  28. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/PatrickHand-Regular.ttf +0 -0
  29. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/fonts/fonts.css +0 -0
  30. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/inversions/__init__.py +0 -0
  31. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/inversions/populator.ipynb +0 -0
  32. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/inversions/precomputed_2x2.py +0 -0
  33. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/inversions/precomputed_3x3.py +0 -0
  34. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/inversions/precomputed_4x4.py +0 -0
  35. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/inversions/precomputed_5x5.py +0 -0
  36. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/inversions/precomputed_6x6.py +0 -0
  37. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/assets/inversions/precomputed_7x7.py +0 -0
  38. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/classesAndVariables.py +0 -0
  39. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/combinatorics.py +0 -0
  40. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/complexStructures.py +0 -0
  41. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/config.py +0 -0
  42. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/coordinateMaps.py +0 -0
  43. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/finiteDimAlgebras.py +0 -0
  44. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/polynomials.py +0 -0
  45. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/styles.py +0 -0
  46. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV/vectorFieldsAndDifferentialForms.py +0 -0
  47. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV.egg-info/SOURCES.txt +0 -0
  48. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV.egg-info/dependency_links.txt +0 -0
  49. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV.egg-info/requires.txt +0 -0
  50. {dgcv-0.2.1 → dgcv-0.2.2}/src/DGCV.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: DGCV
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Differential Geometry with Complex Variables
5
5
  Author: David Sykes
6
6
  Author-email: David Sykes <david@realandimaginary.com>
@@ -24,7 +24,7 @@ DGCV was developed using Python 3.12, with dependencies on the SymPy and Pandas
24
24
  - Fully featured symbolic representations of vector fields, differential forms, and tensor fields
25
25
  - Intuitive interactions with complex structures from holomorphic coordinate systems: DGCV objects dynamically manage coordinate transformations between real and holomorphic coordinates during computation as necessary, so objects can be represented in and freely converted between either coordinate format at any time.
26
26
  - Dedicated python classes for representing common differential geometric structures including Riemannian metrics, Kahler structures, and more
27
- - Custom LaTeX rendering: Integrated LaTeX support for clean visual representation of mathematical objects, ideal for sharing mathematical ideas through clear Jupyter notebooks.
27
+ - Custom LaTeX rendering for clean visual representation of mathematical objects, ideal for sharing mathematical ideas through clear Jupyter notebooks.
28
28
 
29
29
  ## Installation
30
30
 
@@ -10,7 +10,7 @@ DGCV was developed using Python 3.12, with dependencies on the SymPy and Pandas
10
10
  - Fully featured symbolic representations of vector fields, differential forms, and tensor fields
11
11
  - Intuitive interactions with complex structures from holomorphic coordinate systems: DGCV objects dynamically manage coordinate transformations between real and holomorphic coordinates during computation as necessary, so objects can be represented in and freely converted between either coordinate format at any time.
12
12
  - Dedicated python classes for representing common differential geometric structures including Riemannian metrics, Kahler structures, and more
13
- - Custom LaTeX rendering: Integrated LaTeX support for clean visual representation of mathematical objects, ideal for sharing mathematical ideas through clear Jupyter notebooks.
13
+ - Custom LaTeX rendering for clean visual representation of mathematical objects, ideal for sharing mathematical ideas through clear Jupyter notebooks.
14
14
 
15
15
  ## Installation
16
16
 
@@ -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.1"
8
+ version = "0.2.2"
9
9
  description = "Differential Geometry with Complex Variables"
10
10
  authors = [{ name = "David Sykes", email = "david@realandimaginary.com" }]
11
11
  license = { text = "MIT" }
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = DGCV
3
- version = 0.2.1
3
+ version = 0.2.2
4
4
  description = A package for Differential Geometry with Complex Variables
5
5
  author = David Sykes
6
6
  author_email = david@realandimaginary.com
@@ -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.1",
18
+ version="0.2.2",
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',
@@ -672,37 +672,68 @@ class LeviCivitaConnectionClass(Basic):
672
672
  obj = Basic.__new__(cls, varSpace,Christoffel_symbols_of_the_second_kind)
673
673
  return obj
674
674
 
675
- def __init__(self, varSpace, Christoffel_symbols_of_the_second_kind,variable_handling_default='standard'):
676
- if not isinstance(Christoffel_symbols_of_the_second_kind,ImmutableSparseNDimArray):
677
- raise TypeError('The `LeviCivitaConnection` class initializer expects a symmtric tensor field class (STFClass) object in its first argument.')
678
- shapeCheck=Christoffel_symbols_of_the_second_kind.shape
679
- if len(shapeCheck)!=3 and len(set(shapeCheck))!=1:
680
- raise TypeError('The `LeviCivitaConnection` class initializer was given array data for the `Christoffel_symbols_of_the_second_kind` of invalid shape.')
681
- if len(varSpace)!= shapeCheck[0]:
682
- TypeError('The `LeviCivitaConnection` class initializer was given array data for the `Christoffel_symbols_of_the_second_kind` of invalid size relative to the provided coordinate space. Number of coordinates must match the Christoffel symbols\' index range.')
683
- if variable_handling_default=='complex':
684
- if all(var in variable_registry['conversion_dictionaries']['realToSym'] for var in self.varSpace):
685
- self._varSpace_type= 'real'
686
- elif all(var in variable_registry['conversion_dictionaries']['symToReal'] for var in self.varSpace):
675
+ from sympy.tensor.array import ImmutableSparseNDimArray
676
+
677
+ def __init__(self, varSpace, Christoffel_symbols_of_the_second_kind, variable_handling_default='standard'):
678
+ # Attempt to convert the input to an ImmutableSparseNDimArray
679
+ if not isinstance(Christoffel_symbols_of_the_second_kind, ImmutableSparseNDimArray):
680
+ try:
681
+ Christoffel_symbols_of_the_second_kind = ImmutableSparseNDimArray(Christoffel_symbols_of_the_second_kind)
682
+ except Exception as e:
683
+ raise TypeError(
684
+ 'The `LeviCivitaConnection` class initializer expects an ImmutableSparseNDimArray '
685
+ 'or array-like data that can be converted to one. '
686
+ f'Failed to convert the input: {e}'
687
+ )
688
+
689
+ # Check the shape of the Christoffel symbols
690
+ shapeCheck = Christoffel_symbols_of_the_second_kind.shape
691
+ if len(shapeCheck) != 3 or len(set(shapeCheck)) != 1:
692
+ raise TypeError(
693
+ 'The `LeviCivitaConnection` class initializer was given array data for the '
694
+ '`Christoffel_symbols_of_the_second_kind` of invalid shape.'
695
+ )
696
+
697
+ # Check that the coordinate space matches the Christoffel symbols' size
698
+ if len(varSpace) != shapeCheck[0]:
699
+ raise TypeError(
700
+ 'The `LeviCivitaConnection` class initializer was given array data for the '
701
+ '`Christoffel_symbols_of_the_second_kind` of invalid size relative to the provided coordinate space. '
702
+ 'Number of coordinates must match the Christoffel symbols\' index range.'
703
+ )
704
+
705
+ # Handle variable type based on the default handling mode
706
+ if variable_handling_default == 'complex':
707
+ if all(var in variable_registry['conversion_dictionaries']['realToSym'] for var in varSpace):
708
+ self._varSpace_type = 'real'
709
+ elif all(var in variable_registry['conversion_dictionaries']['symToReal'] for var in varSpace):
687
710
  self._varSpace_type = 'complex'
688
711
  else:
689
- raise KeyError('To initialize a `LeviCivitaConnectionClass` instance with variable_handling_default=\'complex\', `varSpace` must contain only variables from DGCV\'s complex variables systems, and all variables in `varSpace` must be simulataneously among the real and imaginary types, or simulateneously among the holomorphic and antiholomorphic types. Use `complexVarProc` to easily create DGCV complex variable systems.')
712
+ raise KeyError(
713
+ 'To initialize a `LeviCivitaConnectionClass` instance with variable_handling_default=\'complex\', '
714
+ '`varSpace` must contain only variables from DGCV\'s complex variables systems, and all variables in '
715
+ '`varSpace` must be simultaneously among the real and imaginary types, or simultaneously among the '
716
+ 'holomorphic and antiholomorphic types. Use `complexVarProc` to easily create DGCV complex variable systems.'
717
+ )
690
718
  else:
691
- self._varSpace_type='standard'
719
+ self._varSpace_type = 'standard'
720
+
721
+ # Assign attributes
692
722
  self.Christoffel_symbols = Christoffel_symbols_of_the_second_kind
693
- self.varSpace=varSpace
723
+ self.varSpace = varSpace
694
724
 
695
725
  def __call__(self,vf1,vf2):
696
726
  if not all([isinstance(vf1,VFClass), isinstance(vf2,VFClass)]):
697
727
  raise TypeError('`LeviCivitaConnectionClass` only operates on pairs of VFClass objects.')
698
728
  dimLoc=len(self.varSpace)
699
729
  def _coeff(VF1,VF2,l):
700
- term1=addVF(*[diff(VF2.coeffs[l],self.varSpace[j])*VF1.coeffs[j] for j in range(dimLoc)])
701
- term2=addVF(*[self.Christoffel_symbols[l,j,k]*VF1.coeffs[j]*VF2.coeffs[k] for j in range(dimLoc) for k in range(dimLoc)])
730
+ term1=sum([diff(VF2.coeffs[l],self.varSpace[j])*VF1.coeffs[j] for j in range(dimLoc)])
731
+ term2=sum([self.Christoffel_symbols[j,k,l]*VF1.coeffs[j]*VF2.coeffs[k] for j in range(dimLoc) for k in range(dimLoc)])
732
+ return term1+term2
702
733
 
703
734
  if self._varSpace_type=='standard':
704
735
  vf1=changeVFBasis(vf1,self.varSpace)
705
- vf2=changeDFBasis(vf2,self.varSpace)
736
+ vf2=changeVFBasis(vf2,self.varSpace)
706
737
  newCoeffs=[_coeff(vf1,vf2,l) for l in range(dimLoc)]
707
738
  return VFClass(self.varSpace,newCoeffs)
708
739
  elif self._varSpace_type=='real':
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: DGCV
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Differential Geometry with Complex Variables
5
5
  Author: David Sykes
6
6
  Author-email: David Sykes <david@realandimaginary.com>
@@ -24,7 +24,7 @@ DGCV was developed using Python 3.12, with dependencies on the SymPy and Pandas
24
24
  - Fully featured symbolic representations of vector fields, differential forms, and tensor fields
25
25
  - Intuitive interactions with complex structures from holomorphic coordinate systems: DGCV objects dynamically manage coordinate transformations between real and holomorphic coordinates during computation as necessary, so objects can be represented in and freely converted between either coordinate format at any time.
26
26
  - Dedicated python classes for representing common differential geometric structures including Riemannian metrics, Kahler structures, and more
27
- - Custom LaTeX rendering: Integrated LaTeX support for clean visual representation of mathematical objects, ideal for sharing mathematical ideas through clear Jupyter notebooks.
27
+ - Custom LaTeX rendering for clean visual representation of mathematical objects, ideal for sharing mathematical ideas through clear Jupyter notebooks.
28
28
 
29
29
  ## Installation
30
30
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes