I want to convert a numpy array to list.
input is :
s = [ 6.72599983 -7.15100002 4.68499994]
i want output as :
s = [6.72599983, -7.15100002, 4.68499994]
how I will do this in python?
closed as unclear what you're asking by Bakuriu, aIKid, Slater Tyranus, user2357112, Benjamin Bannier Jan 8 '14 at 7:47Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question. |
|
If you have a
If you have wrongly casted the
|
|||||||||
|
Your question still is quite unclear. If
and |
|||
|
You can find solution here: Python - convert string to list |
|||
|
string
, you have a numpy array -- to get a list, simply uselist(s)
. But if you thought you had a string, maybe you don't need to convert it... arrays are pretty good too :) – mgilson Jan 8 '14 at 7:24numpy.ndarray
why the hell do you write that it is a string and make up the code in the question to make sure to hide this? -1 -- learn to at least search the documentation before asking a question. – Bakuriu Jan 8 '14 at 7:29