Running
sage -cython quadratic_numerical_approx.pyx
gives a better error message :
$ sage -cython quadratic_numerical_approx.pyx
Error compiling Cython file:
------------------------------------------------------------
...
include "sage/libs/ntl/decl.pxi"
^
------------------------------------------------------------
/home/labbe/Applications/sage-git/local/lib/python2.7/site-packages/sage/rings/number_field/number_field_element_quadratic.pxd:1:0:
'sage/libs/ntl/decl.pxi' not found
Error compiling Cython file:
------------------------------------------------------------
...
from sage.libs.gmp.mpz cimport *
from sage.libs.mpfr cimport *
from sage.rings.number_field.number_field_element_quadratic cimport
NumberFieldElement_quadratic
^
------------------------------------------------------------
quadratic_numerical_approx.pyx:4:0: 'NumberFieldElement_quadratic.pxd' not
found
Error compiling Cython file:
------------------------------------------------------------
...
from sage.libs.gmp.mpz cimport *
from sage.libs.mpfr cimport *
from sage.rings.number_field.number_field_element_quadratic cimport
NumberFieldElement_quadratic
^
------------------------------------------------------------
quadratic_numerical_approx.pyx:4:68: Name 'NumberFieldElement_quadratic'
not declared in module
'sage.rings.number_field.number_field_element_quadratic'
Error compiling Cython file:
------------------------------------------------------------
...
from sage.rings.number_field.number_field_element_quadratic cimport
NumberFieldElement_quadratic
from sage.rings.real_mpfr cimport RealNumber, RealField_class
def quad_nf_element_numerical_approx(NumberFieldElement_quadratic x,
^
------------------------------------------------------------
quadratic_numerical_approx.pyx:8:37: 'NumberFieldElement_quadratic' is not
a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
r"""
Return an approximation of the quadratic element ``x`` in the given real
field ``R``.
"""
cdef RealNumber y = R._new()
mpfr_set_z(y.value, x.D.value, R.rnd)
^
------------------------------------------------------------
quadratic_numerical_approx.pyx:15:27: Cannot convert Python object to
'__mpz_struct *'
Error compiling Cython file:
------------------------------------------------------------
...
field ``R``.
"""
cdef RealNumber y = R._new()
mpfr_set_z(y.value, x.D.value, R.rnd)
mpfr_sqrt(y.value, y.value, R.rnd)
mpfr_mul_z(y.value, y.value, x.b, R.rnd)
^
------------------------------------------------------------
quadratic_numerical_approx.pyx:17:34: Cannot convert Python object to
'__mpz_struct *'
Error compiling Cython file:
------------------------------------------------------------
...
"""
cdef RealNumber y = R._new()
mpfr_set_z(y.value, x.D.value, R.rnd)
mpfr_sqrt(y.value, y.value, R.rnd)
mpfr_mul_z(y.value, y.value, x.b, R.rnd)
mpfr_add_z(y.value, y.value, x.a, R.rnd)
^
------------------------------------------------------------
quadratic_numerical_approx.pyx:18:34: Cannot convert Python object to
'__mpz_struct *'
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.