Note: This is asking for the reverse of the usual tuple-to-array conversion.
I have to pass an argument to a (wrapped c++) function as a nested tupl
I was not satisfied, so I finally used this:
>>> a=numpy.array([[1,2,3],[4,5,6]]) >>> a array([[1, 2, 3], [4, 5, 6]]) >>> tuple(a.reshape(1, -1)[0]) (1, 2, 3, 4, 5, 6)
I don't know if it's quicker, but it looks more effective ;)