Clifford and Geometric Algebra with TensorFlow
Project description
TFGA - TensorFlow Geometric Algebra
Python package for Geometric / Clifford Algebra with TensorFlow 2.
GitHub Docs (coming soon)
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.3.tar.gz
(8.2 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.3-py3-none-any.whl
(8.9 kB
view details)
File details
Details for the file tfga-0.1.3.tar.gz.
File metadata
- Download URL: tfga-0.1.3.tar.gz
- Upload date:
- Size: 8.2 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 |
820ce4476971629c53ad336054945e706b6568f3ff0d6e0d8cd6931c22bbe34a
|
|
| MD5 |
5d78408379ad9825dcdff1a051d3616f
|
|
| BLAKE2b-256 |
02eb63b98d2ee81cbcbde5f34b1ed9f8d91f1cd13b49a6c7ced399ecb363b391
|
File details
Details for the file tfga-0.1.3-py3-none-any.whl.
File metadata
- Download URL: tfga-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.9 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 |
32f461afc19fdc0bfb4ab74ab8be0456f4a3ca3b7f9e0c23057440eb84cad511
|
|
| MD5 |
1031023d2e1df4c688e7c8dc3edbf89b
|
|
| BLAKE2b-256 |
9f4ae2eeaa6ca992dc87ff4ba649351070a7b796aab0825d030204c3fe3eaff5
|