Ek Esawi wrote: > Thanks for the input. I tried your idea but i did not work; l got 1D array > of tuples; the same as the original array. I think b/c genfromtxt creates > an array and so it's already an array object-if i understand it correctly. > Your idea works well for a list which i tested but i want to an n x n 2D > array from 1D n x 1 tuples, each tuple has n elements,.
Be creative, find a workaround like a = [...] b = numpy.array([tuple(row) for row in a], dtype=object) Or try b = numpy.array(a, dtype=(object, object)) _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor