开发者

python: what does array([...]) mean?

开发者 https://www.devze.com 2023-01-10 14:47 出处:网络
i am working with lists, and there is a function that is returning something that looks like this: array([0, 5, 3, 3, 0, 1, 2])

i am working with lists, and there is a function that is returning something that looks like this:

array([0, 5, 3, 3, 0, 1, 2])

how do i cast thos开发者_JAVA百科e values into a list?

what does array mean?


array most likely refers to a numpy.array

myarray = array([0, 5, 3, 3, 0, 1, 2])
mylist = list(myarray)
0

精彩评论

暂无评论...
验证码 换一张
取 消