Hello,
I'm trying to use the new contiguous array support and I've hit a bit
of a problem. I'm curious if this is a bug or is intentional. When I
do
cdef ndarray[float, mode="c"] Xc = X
where X is a 2 dimensional numpy array, it raises an exception:
File "/home/hoytak/workspace/gravimetrics/spatial/gravity.pyx", line
101, in spatial.gravity._setGFFromSamples (spatial/gravity.c:1242)
cdef ndarray[float, mode="c"] Xc = X
ValueError: Buffer has wrong number of dimensions (expected 1, got 2)
However, doing
cdef ndarray[float, mode="c"] Xc = X.reshape(-1)
seems to work fine. If this behavior is intentional, what's the best
way of using contiguous mode with 2+ dim arrays?
Thanks!!!
--Hoyt
++++++++++++++++++++++++++++++++++++++++++++++++
+ Hoyt Koepke
+ University of Washington Department of Statistics
+ http://www.stat.washington.edu/~hoytak/
+ [EMAIL PROTECTED]
++++++++++++++++++++++++++++++++++++++++++
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev