Alex Gordon
Alex Gordon

Reputation: 60741

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

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 those values into a list?

what does array mean?

Upvotes: 2

Views: 2654

Answers (1)

awesomo
awesomo

Reputation: 8816

array most likely refers to a numpy.array

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

Upvotes: 8

Related Questions