Error when attaching file, NameError: name 'cython' is not defined

11 views
Skip to first unread message

Michael Frey

unread,
Jan 10, 2017, 12:12:20 AM1/10/17
to sage-support
I am trying to attach a code file to a sage notebook.  The call is : attach ("~/.sage/MHF_Bloch_n_Plot.sage").  The error I get is "NameError: name 'cython' is not defined".  The code in the attach file is:

...

cython("""

#Parallel Cython, Numpy calls -- 3 part3

#Part 1

#Cython version for parallel

import numpy as np

import scipy as sp

from scipy import linalg

cimport numpy as np

cdef extern from "math.h":

    float cosf(float theta)

    float sinf(float theta)

...

""")

...


Am I missing something or is this a bug?

I am using sage 7.4 in a Fusion Centos 7.2 VM on a MacBook Pro.


I have other problems with the native OS X Sage app and will submit those later.


Thank you for your help. 


Mike

Reply all
Reply to author
Forward
0 new messages