I had thought that if you ran perhaps print mdarray[::][1]
, you would print the first sub-element of every element in the array. Where did I go wrong with this?
I especially need this for a p.plot(x,y[::][1])
where I definitely do not want to use a for loop, as it is horribly slow, unless I'm getting things confused.
What am I getting wrong? Thanks!
EDIT
I still don't know where I got the [::] thing but I solved my problem with either
p.plot(x,c[:,1],color='g',label="Closing value")
or
p.plot(x,[i[1] for i in c],color='g',label="Closing value")
There doesn't seem to be any appreciable difference in time, so I guess I'll use the second because it looks more pythonic/readable to me. Or am I missing something?
Thanks for all of the help!