[SciPy-user] Numeric array indexing using an array?
Christian Kristukat
ckkart at hoc.net
Fri Aug 12 04:29:23 EDT 2005
Ted Dang wrote:
> Is there an easy way of indexing an array using
> another array? (I know this can be done using a for
> loop)
>
> Given:
>
>>>>x=arange(10)
>>>>y=rand(10)
>
>
> Want:
>
>>>>z=y(x)
>>>>z
z = take(y, x)
>
> Also, is this how I'm supposed to use this mailing
> list? For newbie questions?
how about reading the Numeric manual? It's not that long.
> How do I suppress output/print from command line?
>
> Want:
>
>>>>x;
>>>>
So what is that line for?
e.g.
a=x
will not print anything (and not do much though)
Regards, Christian
More information about the SciPy-User
mailing list