python - split array rows into columns from commas -


i had list consisted of 53 3d points, converted list numpy array , have (53,) shape array. each row consisted of 3 float points separated commas (e.g. a_t[0]=73.72,32.27,74.95). know how convert numpy array (53,3)? in other words, want split each row 3 columns each xyz coordinate.

thank in advance.

assuming array called points , numpy has been imported:

newpoints = numpy.array([x.split(',') x in points], dtype=numpy.float) 

Comments