Re: [Numpy-discussion] argsort speed

2014-02-16 Thread Charles R Harris
On Sun, Feb 16, 2014 at 4:12 PM, Daπid wrote: > On 16 February 2014 23:43, wrote: > >> What's the fastest argsort for a 1d array with around 28 Million >> elements, roughly uniformly distributed, random order? >> > > On numpy latest version: > > for kind in ['quicksort', 'mergesort', 'heapsort']

Re: [Numpy-discussion] argsort speed

2014-02-16 Thread josef . pktd
On Sun, Feb 16, 2014 at 7:13 PM, Charles R Harris wrote: > > > > On Sun, Feb 16, 2014 at 4:18 PM, wrote: >> >> On Sun, Feb 16, 2014 at 6:15 PM, wrote: >> > On Sun, Feb 16, 2014 at 5:50 PM, Eelco Hoogendoorn >> > wrote: >> >> >> >> My guess; >> >> >> >> First of all, you are actually manipulati

Re: [Numpy-discussion] argsort speed

2014-02-16 Thread Charles R Harris
On Sun, Feb 16, 2014 at 4:18 PM, wrote: > On Sun, Feb 16, 2014 at 6:15 PM, wrote: > > On Sun, Feb 16, 2014 at 5:50 PM, Eelco Hoogendoorn > > wrote: > >> > >> My guess; > >> > >> First of all, you are actually manipulating twice as much data as > opposed to > >> an inplace sort. > >> > >> Moreo

Re: [Numpy-discussion] argsort speed

2014-02-16 Thread josef . pktd
On Sun, Feb 16, 2014 at 6:12 PM, Daπid wrote: > On 16 February 2014 23:43, wrote: >> >> What's the fastest argsort for a 1d array with around 28 Million >> elements, roughly uniformly distributed, random order? > > > On numpy latest version: > > for kind in ['quicksort', 'mergesort', 'heapsort']:

Re: [Numpy-discussion] Suggestions for GSoC Projects

2014-02-16 Thread Pauli Virtanen
16.02.2014 23:34, Jennifer stone kirjoitti: [clip] > Yeah, many of the known failures seem to revolve around hyp2f1. An > unexplained inclination towards hypergeometric functions really > tempts me to plunge into this. If it's too risky, I can work on > this after the summers, as I would have gain

Re: [Numpy-discussion] argsort speed

2014-02-16 Thread josef . pktd
On Sun, Feb 16, 2014 at 6:15 PM, wrote: > On Sun, Feb 16, 2014 at 5:50 PM, Eelco Hoogendoorn > wrote: >> >> My guess; >> >> First of all, you are actually manipulating twice as much data as opposed to >> an inplace sort. >> >> Moreover, an inplace sort gains locality as it is being sorted, where

Re: [Numpy-discussion] argsort speed

2014-02-16 Thread josef . pktd
On Sun, Feb 16, 2014 at 5:50 PM, Eelco Hoogendoorn wrote: > > My guess; > > First of all, you are actually manipulating twice as much data as opposed to > an inplace sort. > > Moreover, an inplace sort gains locality as it is being sorted, whereas the > argsort is continuously making completely ra

Re: [Numpy-discussion] argsort speed

2014-02-16 Thread Daπid
On 17 February 2014 00:12, Daπid wrote: > I seem unable to find the code for ndarray.sort, so I can't check. I have > tried to grep it tring all possible combinations of "def ndarray", > "self.sort", etc. Where is it? Nevermind, it is in core/src/multiarray/methods.c __

Re: [Numpy-discussion] argsort speed

2014-02-16 Thread Daπid
On 16 February 2014 23:43, wrote: > What's the fastest argsort for a 1d array with around 28 Million > elements, roughly uniformly distributed, random order? > On numpy latest version: for kind in ['quicksort', 'mergesort', 'heapsort']: print kind %timeit np.sort(data, kind=kind) %t

Re: [Numpy-discussion] argsort speed

2014-02-16 Thread Eelco Hoogendoorn
My guess; First of all, you are actually manipulating twice as much data as opposed to an inplace sort. Moreover, an inplace sort gains locality as it is being sorted, whereas the argsort is continuously making completely random memory accesses. -Original Message- From: josef.p...@g

[Numpy-discussion] argsort speed

2014-02-16 Thread josef . pktd
currently using numpy 1.6.1 What's the fastest argsort for a 1d array with around 28 Million elements, roughly uniformly distributed, random order? Is there a reason that np.argsort is almost 3 times slower than np.sort? I'm doing semi-systematic timing for a stats(models) algorithm. Josef

Re: [Numpy-discussion] ANN: Scipy 0.13.3 release

2014-02-16 Thread Ralf Gommers
Binaries are now available on SourceForge. Ralf On Tue, Feb 4, 2014 at 8:16 AM, Ralf Gommers wrote: > Hi, > > I'm happy to announce the availability of the scipy 0.13.3 release. This > is a bugfix only release; it contains fixes for regressions in ndimage and > weave. > > Source tarballs can

Re: [Numpy-discussion] Suggestions for GSoC Projects

2014-02-16 Thread Jennifer stone
On Wed, Feb 12, 2014 at 2:11 AM, Pauli Virtanen wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi > > It's not so often someone wants to work on scipy.special, so you'd be > welcome to improve it :) > > That's great! Thanks a lot for your guidance. . > > - > > Spherical harmonics m

[Numpy-discussion] Removal of doc/cython and doc/pyrex

2014-02-16 Thread Charles R Harris
Apropos #2384 , Ralph has suggested removing the doc/pyrex directory as irrelevant at this point. Along the same lines, we could remove doc/cython as cython now has good numpy support. There is also doc/swig, which contains numpy.i, and which we probably

Re: [Numpy-discussion] Requesting Code Review of nanmedian ENH

2014-02-16 Thread alex
On Sun, Feb 16, 2014 at 1:01 PM, David Freese wrote: > the 0s put into the array copy "arr" are not used in computation. The > _replace_nan call is used primarily to generate a mask of the NaNs and make > sure it passes the mutation test. I updated the unit tests to reflect > negative values, wh

Re: [Numpy-discussion] Requesting Code Review of nanmedian ENH

2014-02-16 Thread alex
> It doesn't deal with numpy.matrix in the same way as numpy.nanmean. never mind about this -- it looks like np.median is currently broken for np.matrix. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/

Re: [Numpy-discussion] Requesting Code Review of nanmedian ENH

2014-02-16 Thread David Freese
the 0s put into the array copy "arr" are not used in computation. The _replace_nan call is used primarily to generate a mask of the NaNs and make sure it passes the mutation test. I updated the unit tests to reflect negative values, which works. (and the documentation should be cleaned up now)

Re: [Numpy-discussion] Requesting Code Review of nanmedian ENH

2014-02-16 Thread alex
On Sun, Feb 16, 2014 at 12:13 PM, David Freese wrote: > Hi everyone, > > I put together a np.nanmedian function to extend np.median to handle nans. > Could someone review this code and give me some feedback on it before I > submit a pull request for it? It looks good to submit as a pull request b

Re: [Numpy-discussion] Requesting Code Review of nanmedian ENH

2014-02-16 Thread Eelco Hoogendoorn
hi david, I havnt run the code; but the _replace_nan(0) call worries me; especially considering that the unit tests seem to deal with positive numbers exclusively. Have you tested with mixed positive/negative inputs? On Sun, Feb 16, 2014 at 6:13 PM, David Freese wrote: > Hi everyone, > > I pu

[Numpy-discussion] Requesting Code Review of nanmedian ENH

2014-02-16 Thread David Freese
Hi everyone, I put together a np.nanmedian function to extend np.median to handle nans. Could someone review this code and give me some feedback on it before I submit a pull request for it? https://github.com/dfreese/numpy/compare/master...feature;nanmedian Thanks, David ___