On Sat, Sep 17, 2011 at 5:46 PM, Santanu Sarkar
<sarkar.santanu....@gmail.com> wrote:
> Hi all,
>
> I want to use cython.
>
> The following code does not work
> %cython
> cdef P
> P = next_prime(ZZ.random_element(2^(100-1),2^100))
>
>
> --
> To post to this group, send email to sage-support@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

Try this -

%cython
from sage.all import *
cdef P
P = next_prime(ZZ.random_element(2^(100-1),2^100))
print P

Rajeev

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to