Re: [Numpy-discussion] binary shift for ndarray

2009-05-20 Thread Robert Kern
On Wed, May 20, 2009 at 14:46, dmitrey wrote: > On May 20, 10:34 pm, Robert Kern wrote: >> On Wed, May 20, 2009 at 14:24, dmitrey wrote: >> > hi all, >> >> > suppose I have A that is numpy ndarray of floats, with shape n x n. >> >> > I want to obtain dot(A, b), b is vector of length n and norm(b

Re: [Numpy-discussion] binary shift for ndarray

2009-05-20 Thread dmitrey
On May 20, 10:34 pm, Robert Kern wrote: > On Wed, May 20, 2009 at 14:24, dmitrey wrote: > > hi all, > > > suppose I have A that is numpy ndarray of floats, with shape n x n. > > > I want to obtain dot(A, b), b is vector of length n and norm(b)=1, but > > instead of exact multiplication I want to

Re: [Numpy-discussion] binary shift for ndarray

2009-05-20 Thread Robert Kern
On Wed, May 20, 2009 at 14:24, dmitrey wrote: > hi all, > > suppose I have A that is numpy ndarray of floats, with shape n x n. > > I want to obtain dot(A, b), b is vector of length n and norm(b)=1, but > instead of exact multiplication I want to approximate b as a vector > [+/- 2^m0, ± 2^m1, ± 2^

[Numpy-discussion] binary shift for ndarray

2009-05-20 Thread dmitrey
hi all, suppose I have A that is numpy ndarray of floats, with shape n x n. I want to obtain dot(A, b), b is vector of length n and norm(b)=1, but instead of exact multiplication I want to approximate b as a vector [+/- 2^m0, ± 2^m1, ± 2^m2 ,,, ± 2^m_n], m_i are integers, and then invoke left_shi