Skip to content

Commit

Permalink
Update "python-calculate" docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
mhostetter committed Jun 23, 2024
1 parent 7886493 commit 36ca4d2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/galois/_domains/_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,10 @@ def compile(cls, mode: Literal["auto", "jit-lookup", "jit-calculate", "python-ca
- `"jit-calculate"`: JIT compiles arithmetic ufuncs to use explicit calculation. The `"jit-calculate"`
mode is designed for large fields that cannot or should not store lookup tables in RAM. Generally,
the `"jit-calculate"` mode is slower than `"jit-lookup"`.
- `"python-calculate"`: Uses pure-Python ufuncs with explicit calculation. This is reserved for fields
- `"python-calculate"`: Uses pure-Python ufuncs with explicit calculation. This is intended for fields
whose elements cannot be represented with :obj:`numpy.int64` and instead use :obj:`numpy.object_`
with Python :obj:`int` (which has arbitrary precision).
with Python :obj:`int` (which has arbitrary precision). However, this mode can be used for any
field, enabling the code to run without Numba JIT compilation.
"""
verify_isinstance(mode, str)
if not mode in ["auto", "jit-lookup", "jit-calculate", "python-calculate"]:
Expand Down
5 changes: 3 additions & 2 deletions src/galois/_fields/_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,10 @@ def compile(cls, mode: Literal["auto", "jit-lookup", "jit-calculate", "python-ca
- `"jit-calculate"`: JIT compiles arithmetic ufuncs to use explicit calculation. The `"jit-calculate"`
mode is designed for large fields that cannot or should not store lookup tables in RAM. Generally,
the `"jit-calculate"` mode is slower than `"jit-lookup"`.
- `"python-calculate"`: Uses pure-Python ufuncs with explicit calculation. This is reserved for fields
- `"python-calculate"`: Uses pure-Python ufuncs with explicit calculation. This is intended for fields
whose elements cannot be represented with :obj:`numpy.int64` and instead use :obj:`numpy.object_`
with Python :obj:`int` (which has arbitrary precision).
with Python :obj:`int` (which has arbitrary precision). However, this mode can be used for any
field, enabling the code to run without Numba JIT compilation.
Group:
Arithmetic compilation
Expand Down
7 changes: 4 additions & 3 deletions src/galois/_fields/_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ def GF(
- `"jit-calculate"`: JIT compiles arithmetic ufuncs to use explicit calculation. The `"jit-calculate"`
mode is designed for large fields that cannot or should not store lookup tables in RAM. Generally, the
`"jit-calculate"` mode is slower than `"jit-lookup"`.
- `"python-calculate"`: Uses pure-Python ufuncs with explicit calculation. This is reserved for fields
whose elements cannot be represented with :obj:`numpy.int64` and instead use :obj:`numpy.object_` with
Python :obj:`int` (which has arbitrary precision).
- `"python-calculate"`: Uses pure-Python ufuncs with explicit calculation. This is intended for fields
whose elements cannot be represented with :obj:`numpy.int64` and instead use :obj:`numpy.object_`
with Python :obj:`int` (which has arbitrary precision). However, this mode can be used for any
field, enabling the code to run without Numba JIT compilation.
repr: The field element representation. This can be modified after class construction with the
:func:`~galois.FieldArray.repr` method. See :doc:`/basic-usage/element-representation` for a further
Expand Down

0 comments on commit 36ca4d2

Please sign in to comment.