Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #97308

Generating a vector from successive multiplications of another vector from an initial value

From Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt>
Newsgroups comp.lang.python
Subject Generating a vector from successive multiplications of another vector from an initial value
Date 2015-10-01 21:45 +0100
Organization Aioe.org NNTP Server
Message-ID <muk61h$eka$1@speranza.aioe.org> (permalink)

Show all headers | View raw


Hi all.

What is the fastest way to do the following:

I have an initial value V and a vector vec of (financial) indexes.
I want to generate a new vector nvec as

V, V*vec[0], V*vec[0]*vec[1], V*vec[0]*vec[1]*vec[2], ...

A numpy vectorized solution would be better.

Thanks

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Generating a vector from successive multiplications of another vector from an initial value Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2015-10-01 21:45 +0100
  Re: Generating a vector from successive multiplications of another vector from an initial value Ian Kelly <ian.g.kelly@gmail.com> - 2015-10-01 15:10 -0600
  Re: Generating a vector from successive multiplications of another vector from an initial value duncan smith <buzzard@invalid.invalid> - 2015-10-02 00:44 +0100
  Re: Generating a vector from successive multiplications of another vector from an initial value Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2015-10-02 02:01 +0100

csiph-web