In Chinese, we say "cutting Tofu". Cheese is really much harder to cut than
Tofu. :)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Anthony Liu
Sent: Monday, April 17, 2006 8:44 PM
To: python-list@python.org
Subject: Re: Slicing matrix
Hi,
Hi, James,
I just realized that my English is so good that I can
joke with slangs. Hopefully it isn't that offensive.
Otherwise, I am sorry.
--- James Stroud <[EMAIL PROTECTED]> wrote:
> Anthony Liu wrote:
> > I figure it out, too. NumArray is so flexible,
> it's
> > like cutting the cheese.
Robert Kern <[EMAIL PROTECTED]> wrote:
...
> array([[ 0, 1, 2, 3, 4],
>[ 5, 6, 7, 8, 9],
>[10, 11, 12, 13, 14],
>[15, 16, 17, 18, 19],
>[20, 21, 22, 23, 24]])
>
> > How do I easily slice out [0,1,2]
>
> In [7]: p[0, :3]
> Out[7]: array([0, 1, 2])
>
> >
Anthony Liu wrote:
> I figure it out, too. NumArray is so flexible, it's
> like cutting the cheese.
Some idioms do not translate so well.
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mai
Hi, Robert,
Thanks a lot.
I figure it out, too. NumArray is so flexible, it's
like cutting the cheese. You can cut it anyway you
want. I really like NumArray.
--- Robert Kern <[EMAIL PROTECTED]> wrote:
> Anthony Liu wrote:
> > I am using numarray.
>
> I will be using numpy for this post,
Anthony Liu wrote:
> I am using numarray.
I will be using numpy for this post, and if you are new to numarray, then you
should probably skip it and use numpy instead. All new development is going
towards numpy.
http://numeric.scipy.org/
> Suppose I have
>
p = array(range(25), shape=(5,5))