[Numpy-discussion] Optimize removing nan-values of dataset

2013-08-12 Thread Thomas Goebel
Hi, i am trying to remove nan-values from an array of shape(40, 6). These nan-values at point data[x] should be replaced by the mean of data[x-1] and data[x+1] if both values at x-1 and x+1 are not nan. The function nan_to_mean (see below) is working but i wonder if i could optimize the code. I t

Re: [Numpy-discussion] About ready to start 1.8 release process.

2013-08-12 Thread Chris Barker - NOAA Federal
On Mon, Aug 12, 2013 at 3:14 PM, Charles R Harris wrote: >> > Datetime64 will not be modified in this release. >> >> I now there is neither the time nor the will for all that it needs, >> but please, please, please, can we yank out the broken timezone >> handling at least? >> >> https://github.co

Re: [Numpy-discussion] About ready to start 1.8 release process.

2013-08-12 Thread Charles R Harris
On Mon, Aug 12, 2013 at 4:05 PM, Chris Barker - NOAA Federal < chris.bar...@noaa.gov> wrote: > On Mon, Aug 12, 2013 at 2:41 PM, Charles R Harris > wrote: > > > Datetime64 will not be modified in this release. > > I now there is neither the time nor the will for all that it needs, > but please, pl

Re: [Numpy-discussion] About ready to start 1.8 release process.

2013-08-12 Thread Chris Barker - NOAA Federal
On Mon, Aug 12, 2013 at 2:41 PM, Charles R Harris wrote: > Datetime64 will not be modified in this release. I now there is neither the time nor the will for all that it needs, but please, please, please, can we yank out the broken timezone handling at least? https://github.com/numpy/numpy/issue

[Numpy-discussion] About ready to start 1.8 release process.

2013-08-12 Thread Charles R Harris
Hi All, I think we are about ready to start on the 1.8 release. There are a few things left to do, but there are PR's for most of them. There are a couple of issues that I think need discussion. 1. Should diagonal return a view in this release or the next? 2. Should multiple field selection

Re: [Numpy-discussion] Using as_strided to avoid copy on repeat (with 2-dimensional array)

2013-08-12 Thread Robert Kern
On Mon, Aug 12, 2013 at 10:01 PM, Nicolas Rougier wrote: > > > Hi, > > I have a (n,2) shaped array representing points and I would like to double each point as in: > > A = np.arange(10*2).reshape(10,2) > B = np.repeat( A, 2, axis=0 ) > > Is it possible to do the same using 'as_strided' to avoid co

[Numpy-discussion] Using as_strided to avoid copy on repeat (with 2-dimensional array)

2013-08-12 Thread Nicolas Rougier
Hi, I have a (n,2) shaped array representing points and I would like to double each point as in: A = np.arange(10*2).reshape(10,2) B = np.repeat( A, 2, axis=0 ) Is it possible to do the same using 'as_strided' to avoid copy (and still get the same output shape for B) ? I found this referenc

Re: [Numpy-discussion] quickselect via np.partition available in 1.8.dev

2013-08-12 Thread Stéfan van der Walt
Hi Julian On Mon, Aug 12, 2013 at 4:23 PM, Julian Taylor wrote: > The function exposing it is: > numpy.partition(data, kth=int/array, axis=-1, kind="introselect", > order=None) This looks great, thanks very much! A minor bug was introduced into the Bento build: https://github.com/numpy/numpy/p

[Numpy-discussion] quickselect via np.partition available in 1.8.dev

2013-08-12 Thread Julian Taylor
Hi, a selection algorithm [0] has now landed in the numpy development branch [1]. The function exposing it is: numpy.partition(data, kth=int/array, axis=-1, kind="introselect", order=None) Please see the docstrings on what it actually does (and report if they are confusing). Thanks to the numpy