Cage opened this issue on Dec 20, 2006 · 1232 posts
adp001 posted Thu, 13 March 2008 at 7:48 PM
Quote - I'll take a look at struct, thanks. In our current code, we're using lists-of-lists-of-floats to represent multiple vertices. For example, 2 vertices would be represented as:
2verts = [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0]]
Use Numeric (or NumPy) and this problem is solved with
flat Accessing the flat attribute of an array returns the flattened, or ravel() 'ed version of that array, without having to do a function call. The returner array has the same number of elements as the input array, but is of rank-1. One cannot set the flat attribute of an array, but one can use the indexing and slicing notations to modify the contents of the array: