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
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 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 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 e_12)
# = 5 + 5 e_10 + 5 e_20 + 5 e_21
# = 5 - 5 e_01 - 5 e_02 - 5 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.6.tar.gz
(11.8 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.6-py3-none-any.whl
(13.1 kB
view details)
File details
Details for the file tfga-0.1.6.tar.gz.
File metadata
- Download URL: tfga-0.1.6.tar.gz
- Upload date:
- Size: 11.8 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 |
50c2c6ddc389c8f1f1338d96ec5a24421759cc930f5ff0f86b75e3035be7c9a6
|
|
| MD5 |
a651a22ba447eefe7d6a5f9cf06af01e
|
|
| BLAKE2b-256 |
f71f60d5ab9f54175576bc7d6315206d07082cac556ccd7c5db9733a26fa0c57
|
File details
Details for the file tfga-0.1.6-py3-none-any.whl.
File metadata
- Download URL: tfga-0.1.6-py3-none-any.whl
- Upload date:
- Size: 13.1 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 |
77b117a39750c805f0feecab1d9e579f87a5738e660dd68c10e983d6f2b5afa5
|
|
| MD5 |
c7023efb150afab75738295c07395a3d
|
|
| BLAKE2b-256 |
ce3e3b9bf8c3f86e26575533c24628336d56f5404100b4eff7273646c4dd7617
|