Thanks for this, very nicely presented.

Looking at the example code at
http://sage.math.washington.edu/home/dagss/cython-notur09.tar.gz

1)  pxd files (lapack.pxd at least) are missing?

2) My 64 bit linux (Centos 5.1) was unhappy with the repack
in readdat.pyx

I get

> >> import readdata
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "readdata.pyx", line 23, in readdata (readdata.c:2850)
    print linearsearch(data, 931)
  File "readdata.pyx", line 11, in readdata.linearsearch (readdata.c:915)
    def linearsearch(np.ndarray[DataLine] data, np.int32_t id):
ValueError: Buffer dtype mismatch; next field is at offset 8 but 2 expected

unless I comment out:

#data = data.astype(np.dtype(DataLine_desc, align=True))

cheers, Phil Austin

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to