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.
Files changed (38) hide show
  1. {hypercomplex_engine-0.4.2/hypercomplex_engine.egg-info → hypercomplex_engine-0.4.2.1}/PKG-INFO +8 -5
  2. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/README.md +6 -3
  3. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/fast_standard.py +0 -3
  4. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/facade.py +7 -3
  5. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/printer/cd_table_printer.py +3 -0
  6. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1/hypercomplex_engine.egg-info}/PKG-INFO +8 -5
  7. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/pyproject.toml +2 -2
  8. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/tests/test_dual_tuple_regression.py +4 -2
  9. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/LICENSE +0 -0
  10. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/__init__.py +0 -0
  11. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/__init__.py +0 -0
  12. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/basis_element.py +0 -0
  13. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/basis_notation.py +0 -0
  14. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/__init__.py +0 -0
  15. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/bit_utils.py +0 -0
  16. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/fast_dual.py +0 -0
  17. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/fast/fast_split.py +0 -0
  18. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/holographic/__init__.py +0 -0
  19. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/holographic/dual.py +0 -0
  20. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/holographic/split.py +0 -0
  21. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/holographic/standard.py +0 -0
  22. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/table_builder/__init__.py +0 -0
  23. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/table_builder/common.py +0 -0
  24. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/table_builder/dual.py +0 -0
  25. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/table_builder/split.py +0 -0
  26. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/table_builder/standard.py +0 -0
  27. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/core/validation.py +0 -0
  28. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/printer/__init__.py +0 -0
  29. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex/printer/cd_format.py +0 -0
  30. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex_engine.egg-info/SOURCES.txt +0 -0
  31. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex_engine.egg-info/dependency_links.txt +0 -0
  32. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex_engine.egg-info/requires.txt +0 -0
  33. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/hypercomplex_engine.egg-info/top_level.txt +0 -0
  34. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/setup.cfg +0 -0
  35. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/tests/test_fast_mode.py +0 -0
  36. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/tests/test_fixes_0_4.py +0 -0
  37. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/tests/test_mega_mother.py +0 -0
  38. {hypercomplex_engine-0.4.2 → hypercomplex_engine-0.4.2.1}/tests/test_split_dim.py +0 -0
@@ -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
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
52
52
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
53
53
  [![GitHub Repo](https://img.shields.io/badge/GitHub-maher1719%2Fhypercomplex--engine-black?logo=github)](https://github.com/maher1719/hypercomplex-engine)
54
- [![PyPI version](https://badge.fury.io/py/hypercomplex-engine.svg)](https://pypi.org/project/hypercomplex-engine/)
54
+ [![PyPI version](https://img.shields.io/pypi/v/hypercomplex-engine.svg)](https://pypi.org/project/hypercomplex-engine/)
55
55
  [![Downloads](https://static.pepy.tech/badge/hypercomplex-engine)](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
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
4
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
5
5
  [![GitHub Repo](https://img.shields.io/badge/GitHub-maher1719%2Fhypercomplex--engine-black?logo=github)](https://github.com/maher1719/hypercomplex-engine)
6
- [![PyPI version](https://badge.fury.io/py/hypercomplex-engine.svg)](https://pypi.org/project/hypercomplex-engine/)
6
+ [![PyPI version](https://img.shields.io/pypi/v/hypercomplex-engine.svg)](https://pypi.org/project/hypercomplex-engine/)
7
7
  [![Downloads](https://static.pepy.tech/badge/hypercomplex-engine)](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
@@ -34,9 +34,6 @@ class FastStandard:
34
34
  s1, i = int(t1[0]), int(t1[1])
35
35
  s2, j = int(t2[0]), int(t2[1])
36
36
 
37
- if s1 == 0 or s2 == 0:
38
- return (0, 0)
39
-
40
37
  sign, idx = self.multiply_indices(i, j)
41
38
 
42
39
  return (s1 * s2 * sign, idx)
@@ -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
- Validation.basis_tuple(a, allow_zero=True, allow_eps=allow_eps)
271
- Validation.basis_tuple(b, allow_zero=True, allow_eps=allow_eps)
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,
@@ -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
@@ -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
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
52
52
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
53
53
  [![GitHub Repo](https://img.shields.io/badge/GitHub-maher1719%2Fhypercomplex--engine-black?logo=github)](https://github.com/maher1719/hypercomplex-engine)
54
- [![PyPI version](https://badge.fury.io/py/hypercomplex-engine.svg)](https://pypi.org/project/hypercomplex-engine/)
54
+ [![PyPI version](https://img.shields.io/pypi/v/hypercomplex-engine.svg)](https://pypi.org/project/hypercomplex-engine/)
55
55
  [![Downloads](https://static.pepy.tech/badge/hypercomplex-engine)](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"
@@ -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
- assert multiply("standard", (0, 2), (1, 3), dim=2) == (0, 0) # formal zero
77
- assert multiply("split", (0, 2), (1, 3), dim=2) == (0, 0)
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():