Re: [Numpy-discussion] common significant diigits

2010-09-15 Thread Benjamin Root
On Wed, Sep 15, 2010 at 2:54 PM, Charles R Harris wrote: > > > On Wed, Sep 15, 2010 at 1:34 PM, Benjamin Root wrote: > >> Hello, >> >> I am trying to solve a problem in matplotlib where I would have an array >> of floating point numbers and I want to quickly determine what is the >> closest comm

Re: [Numpy-discussion] common significant diigits

2010-09-15 Thread Charles R Harris
On Wed, Sep 15, 2010 at 1:34 PM, Benjamin Root wrote: > Hello, > > I am trying to solve a problem in matplotlib where I would have an array of > floating point numbers and I want to quickly determine what is the closest > common offset to a power of 10. In other words, if given: > > [12373.43, 1

Re: [Numpy-discussion] common significant diigits

2010-09-15 Thread Mark Bakker
10*np.floor(a/10).min() ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] common significant diigits

2010-09-15 Thread Gökhan Sever
On Wed, Sep 15, 2010 at 2:34 PM, Benjamin Root wrote: > Hello, > > I am trying to solve a problem in matplotlib where I would have an array of > floating point numbers and I want to quickly determine what is the closest > common offset to a power of 10. In other words, if given: > > [12373.43, 1

[Numpy-discussion] common significant diigits

2010-09-15 Thread Benjamin Root
Hello, I am trying to solve a problem in matplotlib where I would have an array of floating point numbers and I want to quickly determine what is the closest common offset to a power of 10. In other words, if given: [12373.43, 12375.89, 12370.18], I would want returned something like either 123