Thank you for the tip, however, I expect <A,x> being vector of length n
A and x change every iter. A is not sparse.

Alan G Isaac wrote:
> On Fri, 14 Dec 2007, dmitrey apparently wrote:
>   
>> I guess it doesn't matter, but typical n are 1...1000. 
>> However, I need to call the operation hundreds or thousands times (while 
>> running NLP solver ralg, so 4..5 * nIter times). 
>> Number of zeros can be 0...n-1 
>>     
>
> Do both A and x change every iteration?
>
> Anyway, if x is sparse I think you'll get some
> benefit by doing
> idx=N.ravel(x)!=0
> A[:,idx]*x[idx]
>
> hth,
> Alan Isaac
>
>
>
>
> _______________________________________________
> Numpy-discussion mailing list
> [email protected]
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
>
>
>   

_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to