Reputation: 13
How can I convert a list wit one element like this: [[1.0, 0.0, nan]]
into a real list with lenght 3
convert `[[1.0, 0.0, nan]]`(lenght=1) into [1.0, 0.0, nan]`(lenght=3)
Upvotes: 0
Views: 396
Reputation: 403
Simply access the zeroth index of your list which will give you an list of length 3
data=data[0]
should do the job
print(data) // [1.0, 0.0, nan]
Upvotes: 0