Ask Your Question

Revision history [back]

Rather than using

cython(
import numpy as np
...
)

you should just have

import numpy as np
...

and save the file as "FILE.pyx". The "pyx" suffix will tell Sage that it is a Cython file.

Rather than using

cython(
import numpy as np
...
)

you should just have

import numpy as np
...

and save the file as "FILE.pyx". The "pyx" suffix will tell Sage that it is a Cython file.

For the @parallel issue, you need to add an import:

from sage.parallel.decorate import parallel

Rather than using

cython(
import numpy as np
...
)

you should just have

import numpy as np
...

and save the file as "FILE.pyx". The "pyx" suffix will tell Sage that it is a Cython file.

For the @parallel issue, you need to add an import:import: add the line

from sage.parallel.decorate import parallel

at the top of your file.