[SciPy-User] Numpy array: row/column scale?

Nico Schlömer nico.schloemer@gmail....
Sat Oct 16 06:11:36 CDT 2010


HA!

X *= Y

I love Numpy. <3



On Sat, Oct 16, 2010 at 1:05 PM, Nico Schlömer <nico.schloemer@gmail.com> wrote:
> Hi all,
>
> I've got this (100,3) array X and another array Y of length 3 , and
> I'd like to do something like
>
> for k in xrange(3):
>    X[:,k] *= Y[k]
>
> This seems little efficient, and I'm sure there's a more BLASified way
> to do so. Right?
>
> Cheers,
> Nico
>


More information about the SciPy-User mailing list