[Cython] array assignment
Gabriel Gellner
ggellner at uoguelph.ca
Thu Oct 2 23:03:06 CEST 2008
On Thu, Oct 02, 2008 at 05:00:40PM -0400, Gabriel Gellner wrote:
> is there any way to assign an cdef C array at assignment time?
>
> I want something like:
>
> cdef double a[4] = {0.5, 0.3, 0.1, 0.1}
>
> as anything like this possible in Cython? Or do I need to do explicit
> initialization.
>
And if it is explicit is there any way to not just do (can I do some kind of
block assignment?)
a[0] = 0.5
...
a[3] = 0.1
Looking for magic :-)
Gabriel
More information about the Cython-dev
mailing list