I am fairly new to Python. I looked at other similar topics but they are not answering exactly what I want to do. Here is the outcome:
coslist[1:4]
Out[94]: [array([[ 0.7984719]]), array([[ 0.33609957]]), 0]
This is what I want:
coslist=[0.7984719,0.33609957,0]
I tried this:
tolist=list(coslist)
tolist[1:3]
Out[98]: [array([[ 0.7984719]]), array([[ 0.33609957]])]
And this:
y=np.array(val).ravel().tolist()
y[1:4]
Out[99]: [array([[ 0.7984719]]), array([[ 0.33609957]]), 0]
As you see any of them is what I want. Any help will be appreciated.