[Numpy-discussion] matrix multiplication A x, x has some zeros

Alan G Isaac aisaac@american....
Fri Dec 14 17:53:46 CST 2007


>> idx=N.ravel(x)!=0
>> A[:,idx]*x[idx] 


On Fri, 14 Dec 2007, dmitrey apparently wrote:
> I expect <A,x> being vector of length n A and x change 
> every iter. A is not sparse. 

Still, whenever x has a lot of zeros,
this should have a substantial payoff.
That seems the only exploitable information
you have offered in the problem.

Cheers,
Alan





More information about the Numpy-discussion mailing list