kingdon 3.1.0__py3-none-any.whl
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.
- kingdon/__init__.py +33 -0
- kingdon/algebra.py +861 -0
- kingdon/codegen.py +608 -0
- kingdon/einops_backend.py +196 -0
- kingdon/graph.js +177 -0
- kingdon/graph.py +273 -0
- kingdon/graph_magic.py +144 -0
- kingdon/matrixreps.py +153 -0
- kingdon/multivector.py +1033 -0
- kingdon/operator_dict.py +309 -0
- kingdon/operators.py +508 -0
- kingdon/polynomial.py +818 -0
- kingdon/powers.py +63 -0
- kingdon/taperecorder.py +202 -0
- kingdon-3.1.0.dist-info/METADATA +408 -0
- kingdon-3.1.0.dist-info/RECORD +18 -0
- kingdon-3.1.0.dist-info/WHEEL +4 -0
- kingdon-3.1.0.dist-info/licenses/LICENSE +22 -0
kingdon/__init__.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""Top-level package for Kingdon."""
|
|
2
|
+
|
|
3
|
+
__author__ = """Martin Roelfs"""
|
|
4
|
+
__email__ = 'martinroelfs@yahoo.com'
|
|
5
|
+
|
|
6
|
+
import sys
|
|
7
|
+
import importlib.metadata
|
|
8
|
+
|
|
9
|
+
from sympy import symbols
|
|
10
|
+
|
|
11
|
+
from kingdon.algebra import Algebra
|
|
12
|
+
from kingdon.multivector import (
|
|
13
|
+
MultiVector, # Generic MultiVector type.
|
|
14
|
+
Scalar, Vector, Bivector, Trivector, Quadvector, Pentavector, Hexavector, Heptavector, Octovector, # k-vectors
|
|
15
|
+
Bireflection, # compositions
|
|
16
|
+
Direction, EVector, UPoint, Point, Translation, # PGA types
|
|
17
|
+
stack
|
|
18
|
+
)
|
|
19
|
+
from kingdon.matrixreps import expr_as_matrix
|
|
20
|
+
|
|
21
|
+
__version__ = importlib.metadata.version('kingdon')
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def load_ipython_extension(ipython):
|
|
25
|
+
""" Register the :code:`%%graph` cell magic; called by :code:`%load_ext kingdon`. """
|
|
26
|
+
from kingdon.graph_magic import register_magics
|
|
27
|
+
register_magics(ipython)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# Register the magic when kingdon is imported into a running IPython, without importing IPython
|
|
31
|
+
# ourselves: if it is not already imported, there is no shell for us to register with anyway.
|
|
32
|
+
if (_ipython := sys.modules.get('IPython')) and (_shell := _ipython.get_ipython()):
|
|
33
|
+
load_ipython_extension(_shell)
|