I'm working on a module that will hopefully eventually go to the SAGE project. Here's a snippet of code:

import numpy as np
cimport numpy as np
import math
#cimport math
import cmath
#cimport cmath
from math import pi
from cmath import exp

cdef double PI = pi
cdef double TWOPI = 2*PI
cdef I = complex(0,1)

class Riemann_Map():

def __init__(self,f,fprime,a,N, init_full = False):
self.a = a
self.N = N
self.tk = np.array(np.arange(N)*TWOPI/N, dtype = np.float64)
cdef np.ndarray[np.complex128, ndim = 1] cp = np.zeros(N,dtype = np.complex128)

As far as I can tell from the cython/numpy tutorial, that last line should be legit, but I get this error:
"complex128 is not a type identifier"

Because I'm just learning cython, I'll probably be coming back with more questions.

Thanks for any help you can provide,

Ethan Van Andel
Because I'm ver
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to