Convert elements in a numpy array to string
Here's an approach using join method
-
[",".join(item) for item in a.astype(str)]
Sample run -
In [141]: aOut[141]: array([[ 259463.392 , 2737830.062 ], [ 255791.4823, 2742050.772 ], [ 249552.4949, 2746152.328 ], [ 247925.1228, 2746422.143 ], [ 262030.4697, 2728966.229 ], [ 260462.1936, 2731412.856 ], [ 260644.0281, 2735003.027 ], [ 268588.7974, 2732835.097 ]])In [142]: [",".join(item) for item in a.astype(str)]Out[142]: ['259463.392,2737830.062', '255791.4823,2742050.772', '249552.4949,2746152.328', '247925.1228,2746422.143', '262030.4697,2728966.229', '260462.1936,2731412.856', '260644.0281,2735003.027', '268588.7974,2732835.097']