[Cython] Question on Efficient Indexing
Hoyt Koepke
hoytak at cs.ubc.ca
Tue Sep 2 10:21:03 CEST 2008
>> I was reading: http://wiki.cython.org/tutorials/numpy
>>
>> and I am confused on the difference between:
>>
>> A)
>>
>> cimport numpy as np
>> cdef np.ndarray h = np.zeros([xmax, ymax], dtype=DTYPE)
>>
>> and
>>
>> B)
>>
>> cimport numpy as np
>> cdef np.ndarray[DTYPE_t, ndim=2] h =np.zeros([xmax, ymax], dtype=DTYPE)
A quick clarification for my own understanding. Does B provide
everything that A does? Or are some operations slower?
Thanks!
--Hoyt
--
+++++++++++++++++++++++++++++++++++
Hoyt Koepke
UBC Department of Computer Science
http://www.cs.ubc.ca/~hoytak/
hoytak at gmail.com
+++++++++++++++++++++++++++++++++++
More information about the Cython-dev
mailing list