Clifford and Geometric Algebra with TensorFlow
Project description
TFGA - TensorFlow Geometric Algebra
Python package for Geometric / Clifford Algebra with TensorFlow 2.
Installation
Install using pip: pip install tfga
Requirements:
- Python 3
- tensorflow 2
- numpy
- scipy (optional, for
approx_pow)
Basic usage
from tfga import GeometricAlgebra
ga = GeometricAlgebra(metric=[1, 1, 1])
# 1 e_0 + 1 e_1 + 1 e_2
ordinary_vector = ga.ones(batch_shape=[], kind="vector")
# 5 + 5 e_01 + 5 e_02 + 5.0 e_12
quaternion = ga.fill(batch_shape=[], fill_value=5.0, kind="even")
# 5 + 1 e_0 + 1 e_1 + 1 e_2 + 5 e_01 + 5 e_02 + 5.0 e_12
multivector = ordinary_vector + quaternion
# Inner product e_0 | 1 e_0 + 1 e_1 + 1 e_2 = 1
print(ga.basis_mvs[0] | ordinary_vector)
# Exterior product e_0 ^ e_1 = e_01
print(ga.basis_mvs[0] ^ ga.basis_mvs[1])
# Grade reversal ~(5 + 5 e_01 + 5 e_02 + 5.0 e_12)
# = 5 + 5 e_10 + 5 e_20 + 5.0 e_21
# = 5 - 5 e_01 - 5 e_02 - 5.0 e_12
print(~quaternion)
Notebooks
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tfga-0.1.4.tar.gz
(11.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
tfga-0.1.4-py3-none-any.whl
(12.7 kB
view details)
File details
Details for the file tfga-0.1.4.tar.gz.
File metadata
- Download URL: tfga-0.1.4.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1539b83167f929a984e2d7a45ab8e320a5c487b998cc68dad4bcfff6cc2e46bf
|
|
| MD5 |
b2b8ea2a4939334fe8acc1ca5233e7a3
|
|
| BLAKE2b-256 |
1060e1b1cc1eb457ba6e57585aebba00f0a2bfee76e7b33ec1ea310bd7057e7c
|
File details
Details for the file tfga-0.1.4-py3-none-any.whl.
File metadata
- Download URL: tfga-0.1.4-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
804709ac93cee524c67e5e08f52d9e8a3da6435682bfef0eb7b9c366bc8e8d05
|
|
| MD5 |
3316463737c2a0b7d9e4cc6ed405acbd
|
|
| BLAKE2b-256 |
000b2fc475e8d52431e8acb47705cdefe73163852a65eb2b7e82b32b53405938
|