From 36ca4d20f192e0ed68407a8b70c13584461afdc7 Mon Sep 17 00:00:00 2001 From: mhostetter Date: Sun, 23 Jun 2024 12:48:28 -0400 Subject: [PATCH] Update `"python-calculate"` docstrings --- src/galois/_domains/_array.py | 5 +++-- src/galois/_fields/_array.py | 5 +++-- src/galois/_fields/_factory.py | 7 ++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/galois/_domains/_array.py b/src/galois/_domains/_array.py index 21397d443..283de9d49 100644 --- a/src/galois/_domains/_array.py +++ b/src/galois/_domains/_array.py @@ -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"]: diff --git a/src/galois/_fields/_array.py b/src/galois/_fields/_array.py index 5cf847d38..9f1173f32 100644 --- a/src/galois/_fields/_array.py +++ b/src/galois/_fields/_array.py @@ -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 diff --git a/src/galois/_fields/_factory.py b/src/galois/_fields/_factory.py index a09638dfb..caf19b1b9 100644 --- a/src/galois/_fields/_factory.py +++ b/src/galois/_fields/_factory.py @@ -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