[Tutor] a code question, but don't know question's name
ihappydeer at gmail.com
Sun Oct 7 21:29:54 CEST 2007
Thank all for the discussion.
Maybe I can separate my question into two.
First, I have experience in Matlab, where I can use "eval". I wonder whether
someone knows about it.
Second, if I just want to return data[:,1], ...data[:,-1] separately without
knowing ahead how many columns data has. What should I do?
On 10/7/07, Kent Johnson <kent37 at tds.net> wrote:
> Kent Johnson wrote:
> > Alan Gauld wrote:
> >> "Kent Johnson" <kent37 at tds.net> wrote
> >>>> The notation data[;,0] doesn't make sense and is an error in
> >>>> Python.
> >>> [:,0] is an extended slice, not an error:
> >>> http://docs.python.org/ref/slicings.html
> We discussed this quite a bit last July:
> Tutor maillist - Tutor at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor