I want to declare c to be of the type defined by the class Rational.
I'm sure this is easy, but what I want to do is this:
from sage.rings.rational import Rational
cdef Rational c
but that doesn't work. Neither does cimport (which I found in a file
somewhere, albeit commented out, and
On Sun, Jul 24, 2011 at 5:47 PM, john_perry_usm john.pe...@usm.edu wrote:
I want to declare c to be of the type defined by the class Rational.
I'm sure this is easy, but what I want to do is this:
from sage.rings.rational import Rational
cdef Rational c
but that doesn't work. Neither
On Sunday, July 24, 2011, john_perry_usm john.pe...@usm.edu wrote:
What about not-the-notebook? :-) For example, I have the following
file, called test_rational.pyx:
from sage.rings.rational import Rational
import --- cimport ?!
cpdef Rational add(a, b):
return a + b
When I