Dear all,

The following code is working perfectly with sage-4.7.2 and sage-4.8.alpha0
but not with sage-4.8.alpha2.
Some missing imports ?

David.


Source code (stored in file test.pyx)
================================================================
def blop():
   return _blop_()

cdef int _blop_():
   cdef float t0 = cputime()
   cdef int x = randint(0, 100)
   cdef float t1 = cputime()
   print "time %.2f" %(t1-t0)
   return x
================================================================


Error message:
================================================================
sage: attach test.pyx
Compiling ./test.pyx...
Error compiling cython file:
Error converting ./test.pyx to C:


Error compiling Cython file:
------------------------------------------------------------
...

def blop():
   return _blop_()

cdef int _blop_():
   cdef float t0 = cputime()
                         ^
------------------------------------------------------------

_home_dcoudert_Recherche_Hyperbolicity_Code_test_pyx_0.pyx:12:27:
undeclared name not builtin: cputime


Error compiling Cython file:
------------------------------------------------------------
...
def blop():
   return _blop_()

cdef int _blop_():
   cdef float t0 = cputime()
   cdef int x = randint(0, 100)
                      ^
------------------------------------------------------------

_home_dcoudert_Recherche_Hyperbolicity_Code_test_pyx_0.pyx:13:24:
undeclared name not builtin: randint


sage: version()
'Sage Version 4.8.alpha2, Release Date: 2011-11-19'
sage:

================================================================

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to