Re: [Numpy-discussion] NEP for faster ufuncs

2011-01-06 Thread Francesc Alted
2011/1/5, Mark Wiebe mwwi...@gmail.com: On Wed, Jan 5, 2011 at 4:26 AM, Francesc Alted fal...@pytables.org wrote: Sorry for the naive question, but I use the numpy.fromiter() iterator quite a few in my projects. and I'm curious on whether this new iterator would allow numpy.fromiter() to go

[Numpy-discussion] aa.astype(int) truncates and doesn't round

2011-01-06 Thread josef . pktd
just something I bumped into and wasn't aware of aa array([ 1., 1., 1., 1., 1.]) aa.astype(int) array([0, 1, 0, 0, 0]) aa - 1 array([ -2.22044605e-16, 2.22044605e-16, -2.22044605e-16, -3.33066907e-16, -3.33066907e-16]) np.round(aa).astype(int) array([1, 1, 1, 1, 1]) Josef

Re: [Numpy-discussion] aa.astype(int) truncates and doesn't round

2011-01-06 Thread Keith Goodman
On Thu, Jan 6, 2011 at 2:14 AM, josef.p...@gmail.com wrote: just something I bumped into and wasn't aware of aa array([ 1.,  1.,  1.,  1.,  1.]) aa.astype(int) array([0, 1, 0, 0, 0]) aa - 1 array([ -2.22044605e-16,   2.22044605e-16,  -2.22044605e-16,        -3.33066907e-16,  

Re: [Numpy-discussion] aa.astype(int) truncates and doesn't round

2011-01-06 Thread josef . pktd
On Thu, Jan 6, 2011 at 10:40 AM, Keith Goodman kwgood...@gmail.com wrote: On Thu, Jan 6, 2011 at 2:14 AM,  josef.p...@gmail.com wrote: just something I bumped into and wasn't aware of aa array([ 1.,  1.,  1.,  1.,  1.]) aa.astype(int) array([0, 1, 0, 0, 0]) aa - 1 array([ -2.22044605e-16,

Re: [Numpy-discussion] aa.astype(int) truncates and doesn't round

2011-01-06 Thread Robert Kern
On Thu, Jan 6, 2011 at 09:40, Keith Goodman kwgood...@gmail.com wrote: On Thu, Jan 6, 2011 at 2:14 AM,  josef.p...@gmail.com wrote: just something I bumped into and wasn't aware of aa array([ 1.,  1.,  1.,  1.,  1.]) aa.astype(int) array([0, 1, 0, 0, 0]) aa - 1 array([ -2.22044605e-16,  

Re: [Numpy-discussion] aa.astype(int) truncates and doesn't round

2011-01-06 Thread Robert Kern
On Thu, Jan 6, 2011 at 04:14, josef.p...@gmail.com wrote: just something I bumped into and wasn't aware of aa array([ 1.,  1.,  1.,  1.,  1.]) aa.astype(int) array([0, 1, 0, 0, 0]) aa - 1 array([ -2.22044605e-16,   2.22044605e-16,  -2.22044605e-16,        -3.33066907e-16,