I have a list like this:
l=[(1,2),(3,4)]
I want to convert it to a numpy array,and keep array item type as tuple:
array([(1,2),(3,4)])
but numpy.array(l) will give:
array([[1,2],[3,4)]])
and item type has been changed from tuple to numpy.ndarray,then I specified item types
numpy.array(l,numpy.dtype('float,float'))
this gives:
array([(1,2),(3,4)])
but item type isn't tuple but numpy.void,so question is:
how to convert it to a numpy.array of tuple,not of numpy.void?