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
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 dfre...@stanford.edu wrote:
On Sun, Feb 16, 2014 at 12:13 PM, David Freese dfre...@stanford.edu 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
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)
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
On Sun, Feb 16, 2014 at 1:01 PM, David Freese dfre...@stanford.edu 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
On Wed, Feb 12, 2014 at 2:11 AM, Pauli Virtanen p...@iki.fi 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
Binaries are now available on SourceForge.
Ralf
On Tue, Feb 4, 2014 at 8:16 AM, Ralf Gommers ralf.gomm...@gmail.com 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.
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
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:
On 16 February 2014 23:43, josef.p...@gmail.com 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,
On 17 February 2014 00:12, Daπid davidmen...@gmail.com 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
On Sun, Feb 16, 2014 at 5:50 PM, Eelco Hoogendoorn
hoogendoorn.ee...@gmail.com 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
On Sun, Feb 16, 2014 at 6:15 PM, josef.p...@gmail.com wrote:
On Sun, Feb 16, 2014 at 5:50 PM, Eelco Hoogendoorn
hoogendoorn.ee...@gmail.com 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
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 gained
On Sun, Feb 16, 2014 at 6:12 PM, Daπid davidmen...@gmail.com wrote:
On 16 February 2014 23:43, josef.p...@gmail.com 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
On Sun, Feb 16, 2014 at 4:18 PM, josef.p...@gmail.com wrote:
On Sun, Feb 16, 2014 at 6:15 PM, josef.p...@gmail.com wrote:
On Sun, Feb 16, 2014 at 5:50 PM, Eelco Hoogendoorn
hoogendoorn.ee...@gmail.com wrote:
My guess;
First of all, you are actually manipulating twice as much data as
On Sun, Feb 16, 2014 at 7:13 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Sun, Feb 16, 2014 at 4:18 PM, josef.p...@gmail.com wrote:
On Sun, Feb 16, 2014 at 6:15 PM, josef.p...@gmail.com wrote:
On Sun, Feb 16, 2014 at 5:50 PM, Eelco Hoogendoorn
hoogendoorn.ee...@gmail.com
On Sun, Feb 16, 2014 at 4:12 PM, Daπid davidmen...@gmail.com wrote:
On 16 February 2014 23:43, josef.p...@gmail.com 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
19 matches
Mail list logo