Skip to main content

dgcv: Differential Geometry with Complex Variables

dgcv is an open-source Python package providing basic tools for differential geometry integrated with systematic organization of structures naturally accompanying complex variables, in short, Differential Geometry with Complex Variables. The library is perfectly suitable for DG work independent of complex structures, and CV is emphasized in the name because dgcv is designed from the ground up to work well in holomorphic settings.

At its core are symbolic representations of standard DG objects such as tensor fields (e.g., vector fields and differential forms) and algebras, and tools for doing standard computations with them. There are coordinate free representations, and representations defined relative to coordinate systems falling into two general categories:

  • standard - basic systems that can represent real or complex coordinates, sufficient for applications that do not require dgcv's complex variable handling features.
  • complex - richer systems for representing complex coordinate patches that interact with dgcv's complex variable handling features. These are comprised of holomorphic coordinate functions, their conjugates, and their real and imaginary parts (e.g., $\{z_j,\overline{z_j},x_j,y_j\}$).

dgcv functions account for coordinate types dynamically when operating on objects built from such coordinate systems. The package has a substantial library for coordinate-free representations as well, and tools for converting between the two paradigms.

As systems of differential geometric objects constructed from complex variables inherit natural relationships from the underlying complex structure, dgcv objects track these relationships across the constructions. This system enables smooth switching between real and holomorphic coordinate representations of mathematical objects. In computations, dgcv objects dynamically manage this format switching on their own so that typical complex variables formulas can be written plainly and will simply work. Some examples of this: In coordinates $z_j = x_j + iy_j$, expressions such as $\frac{\partial}{\partial x_j}|z_j|^2$ or $d z_j \wedge d \overline{z_j} \left( \frac{\partial}{\partial z_j}, \frac{\partial}{\partial y_j} \right)$ are correctly parsed without needing to convert everything to a uniform variable format. Retrieving objects' complex structure-related attributes, like the holomorphic part of a vector field or pluriharmonic terms from a polynomial is straightforward. Complexified cotangent bundles and their exterior algebras are easily decomposed into components from the Dolbeault complex and Dolbeault operators themselves can be applied to functions and k-forms in either coordinate format.

dgcv is tested on Python 3.13.

Documentation

dgcv documentation is hosted at https://www.realandimaginary.com/dgcv/, with documentation pages for individual functions in the library and more.

Tutorials

Many tutorials for using dgcv are available at https://www.realandimaginary.com/dgcv/tutorials/.

Installation

dgcv can be installed directly from PyPI with pip:

pip install dgcv

Optional supporting libraries can be installed simultaneously as needed:

pip install dgcv[sympy] # simultaneously install SymPy
pip install dgcv[ipython] # simultaneously install IPython
pip install dgcv[recommended] # simultaneously installs both IPython and SymPy

Depending on Python install configurations, the above command can vary. The key is to have the relevant Python environment active so that the package manager pip sources from the right location (suggested to use virtual environments: Getting started with virtual environments).

AI Disclosure

dgcv development is cautiosly incorporating AI assistance for coding, always followed by human review. The first significant use was in the developement of version 0.5.0, where AI orchestrated extensive performance profiling and identified important refinements to when and where dgcv algorithms apply CAS simplify calls. Ongoing roles are described further at dgcv AI policies. Considerations behind the decision to allow AI tools in dgcv development are given there as well. Core mathematical algorithms and logic within dgcv remain human-designed, with one exception: Starting with version 0.6.0, dgcv includes a subpackage that is AI-generated, namely dgcv._symbolic_scalars, which supplies the built-in symbolic engine. This is the default engine today, but one can also completely avoid it and use SymPy or SageMath alternatives with dgcv settings configurations (see default_engine).

The subpackage has been carefully reviewed by the author and passed extensive testing. But such review does not rigorously certify correctness, so dgcv will always support compatibility with alternative open source CAS libraries.

License

dgcv is licensed under an Apache 2.0 License. See the LICENSE and NOTICE files for more information.

Author

dgcv was created and is maintained by David Sykes.


Development Notes

dgcv is always growing and updated regularly. I often make new functions for personal projects, and add the ones with general utility for others to the public versions of the library. Contributions, suggestions for additions to the library, and feedback from anyone interested are very much welcome. –D.S.

Metadata

Release files for dgcv 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dgcv 0.6.2
File Size Uploaded Provenance Actions
dgcv-0.6.2.tar.gz 687.4 kB With provenance Details for dgcv-0.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dgcv 0.6.2
File Interpreter ABI Platform Actions
dgcv-0.6.2-py3-none-any.whl Python 3 none any Details for dgcv-0.6.2-py3-none-any.whl

Total release size: 1.5 MB

Release files / dgcv-0.6.2.tar.gz

Download URL dgcv-0.6.2.tar.gz
Size 687.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e74d283a0f6be4c0a60a8592d3833bdbcd07fc690e748003baced36fd319a50c
BLAKE2b-256 checksum
How to use checksums
4bd488495796c4f277ad05b58f25689e9cc32d9cc7d6bff6a523de688f1de608
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / dgcv-0.6.2-py3-none-any.whl

Download URL dgcv-0.6.2-py3-none-any.whl
Size 810.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7455017d3c2edcd12c1e32438111a2b6a27bd01ba1d708aeeebe1b5a76a451b3
BLAKE2b-256 checksum
How to use checksums
54eb11b158f6a7919fd77d0f207734eb6d7546e3ea8dd2e959a5c9ca72797287
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Security for dgcv 0.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dgcv-0.6.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.6.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page