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 at netcabo.pt
Thu Oct 1 16:45:40 EDT 2015


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


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /