hypercomplex-engine 0.4.2__tar.gz → 0.4.2.1__tar.gz
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.
- {hypercomplex_engine-0.4.2/hypercomplex_engine.egg-info → hypercomplex_engine-0.4.2.1}/PKG-INFO +8 -5
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/README.md +6 -3
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/fast_standard.py +0 -3
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/facade.py +7 -3
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/printer/cd_table_printer.py +3 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1/hypercomplex_engine.egg-info}/PKG-INFO +8 -5
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/pyproject.toml +2 -2
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/tests/test_dual_tuple_regression.py +4 -2
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/LICENSE +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/__init__.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/__init__.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/basis_element.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/basis_notation.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/__init__.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/bit_utils.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/fast_dual.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/fast_split.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/holographic/__init__.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/holographic/dual.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/holographic/split.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/holographic/standard.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/table_builder/__init__.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/table_builder/common.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/table_builder/dual.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/table_builder/split.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/table_builder/standard.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/validation.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/printer/__init__.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/printer/cd_format.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex_engine.egg-info/SOURCES.txt +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex_engine.egg-info/dependency_links.txt +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex_engine.egg-info/requires.txt +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex_engine.egg-info/top_level.txt +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/setup.cfg +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/tests/test_fast_mode.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/tests/test_fixes_0_4.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/tests/test_mega_mother.py +0 -0
- {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/tests/test_split_dim.py +0 -0
{hypercomplex_engine-0.4.2/hypercomplex_engine.egg-info → hypercomplex_engine-0.4.2.1}/PKG-INFO
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hypercomplex-engine
|
|
3
|
-
Version: 0.4.2
|
|
4
|
-
Summary: Fast O(1)/O(n) multiplication engine and table generator for ordinary, split, and dual Cayley-Dickson algebras.
|
|
3
|
+
Version: 0.4.2.1
|
|
4
|
+
Summary: Fast O(1)/O(n) multiplication engine for arbitrary dimensions and table generator for ordinary, split, and dual Cayley-Dickson algebras.
|
|
5
5
|
Author-email: Maher Ben Abdessalem <ba.maher94@gmail.com>
|
|
6
6
|
License: MIT License
|
|
7
7
|
|
|
@@ -51,11 +51,14 @@ Dynamic: license-file
|
|
|
51
51
|
[](https://opensource.org/licenses/MIT)
|
|
52
52
|
[](https://www.python.org/downloads/)
|
|
53
53
|
[](https://github.com/maher1719/hypercomplex-engine)
|
|
54
|
-
[](https://pypi.org/project/hypercomplex-engine/)
|
|
55
55
|
[](https://pepy.tech/project/hypercomplex-engine)
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
Fast, validated multiplication and table generation for Cayley–Dickson algebras.
|
|
58
|
+
Fast, cross validated multiplication and table generation for Cayley–Dickson algebras multiplication up to **one million digit** two elements index tested for O(1)/O(n) and depend on RAM allocation up to 2^13 or more for table builder.
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
For more info please visit All benchamrks in [BENCHMARKS.md](https://github.com/maher1719/hypercomplex-engine/blob/main/BENCHMARKS.md) and Jupyter Notebook used in [examples/benchmark/benchmark.ipynb](https://github.com/maher1719/hypercomplex-engine/blob/main/examples/benchmark/benchmark.ipynb) (note speed time may vary depend on your hardware).
|
|
59
62
|
|
|
60
63
|
This library provides the computational substrate for high-dimensional hypercomplex algebra, featuring:
|
|
61
64
|
|
|
@@ -70,7 +73,7 @@ This library provides the computational substrate for high-dimensional hypercomp
|
|
|
70
73
|
|
|
71
74
|
## Scope and limitations
|
|
72
75
|
|
|
73
|
-
If you build upon this package, please read fully [Go to Scope, Strengths, and Limitations](#scope-strengths-and-limitations) below for more information or check [Scope, Strengths, and Limitations file](README_scope_and_limitations.md#scope-strengths-and-limitations)
|
|
76
|
+
If you build upon this package, please read fully [Go to Scope, Strengths, and Limitations](#scope-strengths-and-limitations) below for more information or check [Scope, Strengths, and Limitations file](https://github.com/maher1719/hypercomplex-engine/blob/main/README_scope_and_limitations.md#scope-strengths-and-limitations)
|
|
74
77
|
|
|
75
78
|
|
|
76
79
|
## 📄 Publications & Preprints
|
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
[](https://opensource.org/licenses/MIT)
|
|
4
4
|
[](https://www.python.org/downloads/)
|
|
5
5
|
[](https://github.com/maher1719/hypercomplex-engine)
|
|
6
|
-
[](https://pypi.org/project/hypercomplex-engine/)
|
|
7
7
|
[](https://pepy.tech/project/hypercomplex-engine)
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
Fast, validated multiplication and table generation for Cayley–Dickson algebras.
|
|
10
|
+
Fast, cross validated multiplication and table generation for Cayley–Dickson algebras multiplication up to **one million digit** two elements index tested for O(1)/O(n) and depend on RAM allocation up to 2^13 or more for table builder.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
For more info please visit All benchamrks in [BENCHMARKS.md](https://github.com/maher1719/hypercomplex-engine/blob/main/BENCHMARKS.md) and Jupyter Notebook used in [examples/benchmark/benchmark.ipynb](https://github.com/maher1719/hypercomplex-engine/blob/main/examples/benchmark/benchmark.ipynb) (note speed time may vary depend on your hardware).
|
|
11
14
|
|
|
12
15
|
This library provides the computational substrate for high-dimensional hypercomplex algebra, featuring:
|
|
13
16
|
|
|
@@ -22,7 +25,7 @@ This library provides the computational substrate for high-dimensional hypercomp
|
|
|
22
25
|
|
|
23
26
|
## Scope and limitations
|
|
24
27
|
|
|
25
|
-
If you build upon this package, please read fully [Go to Scope, Strengths, and Limitations](#scope-strengths-and-limitations) below for more information or check [Scope, Strengths, and Limitations file](README_scope_and_limitations.md#scope-strengths-and-limitations)
|
|
28
|
+
If you build upon this package, please read fully [Go to Scope, Strengths, and Limitations](#scope-strengths-and-limitations) below for more information or check [Scope, Strengths, and Limitations file](https://github.com/maher1719/hypercomplex-engine/blob/main/README_scope_and_limitations.md#scope-strengths-and-limitations)
|
|
26
29
|
|
|
27
30
|
|
|
28
31
|
## 📄 Publications & Preprints
|
|
@@ -267,8 +267,12 @@ def multiply(
|
|
|
267
267
|
# Validate inputs before any early return, so malformed data always
|
|
268
268
|
# raises ValidationError instead of leaking TypeError/IndexError.
|
|
269
269
|
allow_eps = kind in ("dual", "dual_split")
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
if allow_eps:
|
|
271
|
+
Validation.basis_tuple(a, allow_zero=True, allow_eps=allow_eps)
|
|
272
|
+
Validation.basis_tuple(b, allow_zero=True, allow_eps=allow_eps)
|
|
273
|
+
else:
|
|
274
|
+
Validation.basis_tuple(a, allow_zero=False, allow_eps=False)
|
|
275
|
+
Validation.basis_tuple(b, allow_zero=False, allow_eps=False)
|
|
272
276
|
|
|
273
277
|
# Zero propagation
|
|
274
278
|
if int(a[0]) == 0 or int(b[0]) == 0:
|
|
@@ -354,7 +358,7 @@ def export_csv(
|
|
|
354
358
|
Export a table built by build_table().
|
|
355
359
|
"""
|
|
356
360
|
signs, indices, eps = _unpack_table(table)
|
|
357
|
-
|
|
361
|
+
|
|
358
362
|
return CDTablePrinter.export_csv(
|
|
359
363
|
path,
|
|
360
364
|
signs,
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/printer/cd_table_printer.py
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from .cd_format import CDFormat
|
|
2
|
+
import logging
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
class CDTablePrinter:
|
|
@@ -200,5 +201,7 @@ class CDTablePrinter:
|
|
|
200
201
|
line += f",{int(eps[i, j])}"
|
|
201
202
|
|
|
202
203
|
f.write(line + "\n")
|
|
204
|
+
logging.basicConfig(level=logging.INFO)
|
|
203
205
|
|
|
206
|
+
logging.info(f"Table successfully built {path} ")
|
|
204
207
|
return path
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1/hypercomplex_engine.egg-info}/PKG-INFO
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hypercomplex-engine
|
|
3
|
-
Version: 0.4.2
|
|
4
|
-
Summary: Fast O(1)/O(n) multiplication engine and table generator for ordinary, split, and dual Cayley-Dickson algebras.
|
|
3
|
+
Version: 0.4.2.1
|
|
4
|
+
Summary: Fast O(1)/O(n) multiplication engine for arbitrary dimensions and table generator for ordinary, split, and dual Cayley-Dickson algebras.
|
|
5
5
|
Author-email: Maher Ben Abdessalem <ba.maher94@gmail.com>
|
|
6
6
|
License: MIT License
|
|
7
7
|
|
|
@@ -51,11 +51,14 @@ Dynamic: license-file
|
|
|
51
51
|
[](https://opensource.org/licenses/MIT)
|
|
52
52
|
[](https://www.python.org/downloads/)
|
|
53
53
|
[](https://github.com/maher1719/hypercomplex-engine)
|
|
54
|
-
[](https://pypi.org/project/hypercomplex-engine/)
|
|
55
55
|
[](https://pepy.tech/project/hypercomplex-engine)
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
Fast, validated multiplication and table generation for Cayley–Dickson algebras.
|
|
58
|
+
Fast, cross validated multiplication and table generation for Cayley–Dickson algebras multiplication up to **one million digit** two elements index tested for O(1)/O(n) and depend on RAM allocation up to 2^13 or more for table builder.
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
For more info please visit All benchamrks in [BENCHMARKS.md](https://github.com/maher1719/hypercomplex-engine/blob/main/BENCHMARKS.md) and Jupyter Notebook used in [examples/benchmark/benchmark.ipynb](https://github.com/maher1719/hypercomplex-engine/blob/main/examples/benchmark/benchmark.ipynb) (note speed time may vary depend on your hardware).
|
|
59
62
|
|
|
60
63
|
This library provides the computational substrate for high-dimensional hypercomplex algebra, featuring:
|
|
61
64
|
|
|
@@ -70,7 +73,7 @@ This library provides the computational substrate for high-dimensional hypercomp
|
|
|
70
73
|
|
|
71
74
|
## Scope and limitations
|
|
72
75
|
|
|
73
|
-
If you build upon this package, please read fully [Go to Scope, Strengths, and Limitations](#scope-strengths-and-limitations) below for more information or check [Scope, Strengths, and Limitations file](README_scope_and_limitations.md#scope-strengths-and-limitations)
|
|
76
|
+
If you build upon this package, please read fully [Go to Scope, Strengths, and Limitations](#scope-strengths-and-limitations) below for more information or check [Scope, Strengths, and Limitations file](https://github.com/maher1719/hypercomplex-engine/blob/main/README_scope_and_limitations.md#scope-strengths-and-limitations)
|
|
74
77
|
|
|
75
78
|
|
|
76
79
|
## 📄 Publications & Preprints
|
|
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hypercomplex-engine"
|
|
7
|
-
version = "0.4.2"
|
|
7
|
+
version = "0.4.2.1"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Maher Ben Abdessalem", email="ba.maher94@gmail.com" },
|
|
10
10
|
]
|
|
11
|
-
description = "Fast O(1)/O(n) multiplication engine and table generator for ordinary, split, and dual Cayley-Dickson algebras."
|
|
11
|
+
description = "Fast O(1)/O(n) multiplication engine for arbitrary dimensions and table generator for ordinary, split, and dual Cayley-Dickson algebras."
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
license = { file="LICENSE" }
|
|
14
14
|
requires-python = ">=3.10"
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/tests/test_dual_tuple_regression.py
RENAMED
|
@@ -73,8 +73,10 @@ def test_facade_dual_3tuple_promotion():
|
|
|
73
73
|
def test_facade_zero_shapes():
|
|
74
74
|
assert multiply("dual", (0, 2), (1, 3), dim=2) == (0, 0, 0)
|
|
75
75
|
assert multiply("dual_split", (1, 2), (0, 3), dim=2) == (0, 0, 0)
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
with pytest.raises((TypeError, ValueError)):
|
|
77
|
+
assert multiply("standard", (0, 2), (1, 3), dim=2) == (0, 0)
|
|
78
|
+
with pytest.raises((TypeError, ValueError)): # formal zero
|
|
79
|
+
assert multiply("split", (0, 2), (1, 3), dim=2) == (0, 0)
|
|
78
80
|
|
|
79
81
|
|
|
80
82
|
def test_facade_malformed_raises_validation_error():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/basis_element.py
RENAMED
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/basis_notation.py
RENAMED
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/__init__.py
RENAMED
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/bit_utils.py
RENAMED
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/fast_dual.py
RENAMED
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/fast_split.py
RENAMED
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/holographic/__init__.py
RENAMED
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/holographic/dual.py
RENAMED
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/holographic/split.py
RENAMED
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/holographic/standard.py
RENAMED
|
File without changes
|
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/table_builder/common.py
RENAMED
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/table_builder/dual.py
RENAMED
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/table_builder/split.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex_engine.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex_engine.egg-info/requires.txt
RENAMED
|
File without changes
|
{hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex_engine.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|