Skip to content

Commit 163f7cc

Browse files
committed
move docstring to class
1 parent 66c54f4 commit 163f7cc

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

src/flint/types/fq_default.pxd

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ from flint.flintlib.fq cimport fq_is_primitive, fq_multiplicative_order
55
from flint.types.fmpz cimport fmpz
66
from flint.flint_base.flint_base cimport flint_scalar
77

8+
"""
9+
Enum for the fq_default context types:
10+
11+
- 1. `fq_default_ctx.FQ_ZECH`: Use `fq_zech_t`,
12+
- 2. `fq_default_ctx.FQ_NMOD`: Use `fq_nmod_t`,
13+
- 3. `fq_default_ctx.FQ`: Use `fq_t`.
14+
- 4. `fq_default_ctx.NMOD`: Use `nmod` for degree = 1,
15+
- 5. `fq_default_ctx.FMPZ_MOD`: Use `fmpz_mod` for degree = 1.
16+
17+
These can be manually selected, or type: `fq_default_ctx.DEFAULT` can be used
18+
for the implementation to be automatically decided by Flint (default),
19+
"""
820
cpdef enum fq_default_type:
921
DEFAULT = 0
1022
FQ_ZECH = 1

src/flint/types/fq_default.pyx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ cdef class fq_default_ctx:
125125
`var` is a name for the ring generator of this field over GF(p).
126126
127127
The optional parameter `type` select the implementation. For more
128-
information about the types available, see :method:`~.fq_type`.
128+
information about the types available, see :class:`~.fq_default_type`
129+
for possible types.
129130
"""
130131
# c_from_order expects the characteristic to be fmpz type
131132
prime = any_as_fmpz(p)
@@ -165,7 +166,8 @@ cdef class fq_default_ctx:
165166
`var` is a name for the ring generator of this field over the prime field.
166167
167168
The optional parameter `type` select the implementation. For more
168-
information about the types available, see :method:`~.fq_type`.
169+
information about the types available, see :class:`~.fq_default_type`
170+
for possible types.
169171
"""
170172
if check_modulus and not modulus.is_irreducible():
171173
raise ValueError("modulus must be irreducible")
@@ -176,16 +178,7 @@ cdef class fq_default_ctx:
176178
@property
177179
def fq_type(self):
178180
"""
179-
Return the implementation of this context. It is one of:
180-
181-
- 1. `fq_default_ctx.FQ_ZECH`: Use `fq_zech_t`,
182-
- 2. `fq_default_ctx.FQ_NMOD`: Use `fq_nmod_t`,
183-
- 3. `fq_default_ctx.FQ`: Use `fq_t`.
184-
- 4. `fq_default_ctx.NMOD`: Use `nmod` for degree = 1,
185-
- 5. `fq_default_ctx.FMPZ_MOD`: Use `fmpz_mod` for degree = 1.
186-
187-
These can be manually selected, or type: `fq_default_ctx.DEFAULT` can be used
188-
for the implementation to be automatically decided by Flint (default),
181+
Return the implementation of this context
189182
"""
190183
return fq_default_type(fq_default_ctx_type(self.val))
191184

0 commit comments

Comments
 (0)