ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 14 May 2020 22:59:33 +0200How to use finite fields in cython?https://ask.sagemath.org/question/51411/how-to-use-finite-fields-in-cython/To use finite fields there is the function GF.
It works well in python, but produces the following error in cython:
`undeclared name not builtin: GF`
How to use finite fields in cython?Thu, 14 May 2020 22:40:35 +0200https://ask.sagemath.org/question/51411/how-to-use-finite-fields-in-cython/Answer by tmonteil for <p>To use finite fields there is the function GF. <br>
It works well in python, but produces the following error in cython: <br>
<code>undeclared name not builtin: GF</code></p>
<p>How to use finite fields in cython?</p>
https://ask.sagemath.org/question/51411/how-to-use-finite-fields-in-cython/?answer=51412#post-id-51412`GF` is a shortcut for `FiniteField`, so you can declare it as follows:
from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF
In case something like this reappears, there is a very handy helper function to discover import statements : `import_statements`
Thu, 14 May 2020 22:59:33 +0200https://ask.sagemath.org/question/51411/how-to-use-finite-fields-in-cython/?answer=51412#post-id-51412