[Numpy-discussion] List of Lists in C
Mon Jan 26 02:18:17 CST 2009
Don't remember that you are using the same list in each element of the
outer list. If you don't want this, use [ for i in range(5)]. I
don't think there is another way in C either (or too complicated).
2009/1/26 Hanni Ali <firstname.lastname@example.org>:
> Quick question, I've been doing a fair bit of extension writing in C
> recently, but wondered how best to implement:
>>>> l = [] * 5
> to create a list of a given length containing the initialization variable
> A loop seems the straight forward manner, but I would have thought there was
> a more efficient way...
> Currently I just do it in Python and pass through the already initialized
> list as it seems perfectly efficient.
> Numpy-discussion mailing list
Information System Engineer, Ph.D.
Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92
More information about the Numpy-discussion