pyfastcd 1.3.1__cp313-cp313-win_amd64.whl

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.
pyfastcd/__init__.py ADDED
@@ -0,0 +1,59 @@
1
+ """Fast, matrix-free Cayley--Dickson arithmetic over R, C and finite fields.
2
+
3
+ ``pyfastcd`` provides immutable scalar elements and NumPy-backed element
4
+ arrays. Coefficients are real ``float64`` by default; ``char`` and ``deg``
5
+ select complex or finite-field coefficients. Arithmetic is delegated to the
6
+ compiled fastCD kernels; the Python API does not construct multiplication or
7
+ operator matrices.
8
+
9
+ The conventional abbreviation is ``fcd``::
10
+
11
+ import pyfastcd as fcd
12
+
13
+ H = fcd.Algebra(dimension=4)
14
+ a = H([1, 2, 3, 4])
15
+ b = a ** 2
16
+
17
+ Use ``**`` for powers. In ordinary Python, ``^`` is bitwise XOR and is not
18
+ overridden as exponentiation.
19
+
20
+ Public API
21
+ ----------
22
+ Algebra
23
+ Immutable, dimension-cached parent and primary constructor.
24
+ Element
25
+ Immutable scalar element backed directly by native coefficient storage.
26
+ ElementArray
27
+ NumPy-backed batch with leading-axis broadcasting.
28
+ FiniteField
29
+ Immutable finite coefficient field in a recorded polynomial basis.
30
+ BasisProduct
31
+ Signed standard-basis multiplication result.
32
+ cd_element
33
+ Convenience constructor that infers a power-of-two dimension.
34
+
35
+ Notes
36
+ -----
37
+ The package intentionally exposes mathematical values rather than native
38
+ status codes or workspace buffers. CD conjugation fixes coefficients;
39
+ ``quadratic_norm()`` returns the quadratic form ``sum_i x_i**2`` in the
40
+ coefficient field.
41
+ Real parents reject complex coefficients.
42
+ """
43
+
44
+ from ._algebra import Algebra, BasisProduct, cd_element
45
+ from ._array import ElementArray
46
+ from ._core import Element, _version
47
+ from ._field import FiniteField
48
+
49
+ __version__ = _version()
50
+
51
+ __all__ = [
52
+ "__version__",
53
+ "Algebra",
54
+ "BasisProduct",
55
+ "Element",
56
+ "ElementArray",
57
+ "cd_element",
58
+ "FiniteField",
59
+ ]
pyfastcd/__init__.pyi ADDED
@@ -0,0 +1,9 @@
1
+ from ._algebra import Algebra as Algebra
2
+ from ._algebra import BasisProduct as BasisProduct
3
+ from ._algebra import cd_element as cd_element
4
+ from ._array import ElementArray as ElementArray
5
+ from ._core import Element as Element
6
+ from ._field import FiniteField as FiniteField
7
+
8
+ __version__: str
9
+ __all__: list[str]