Re: [Numpy-discussion] Rewrite np.histogram in c?

2015-03-16 Thread Robert McGibbon
Hi, It sounds like putting together a PR makes sense then. I'll try hacking on this a bit. -Robert On Mar 16, 2015 11:20 AM, "Jaime Fernández del Río" wrote: > On Mon, Mar 16, 2015 at 9:28 AM, Jerome Kieffer > wrote: > >> On Mon, 16 Mar 2015 06:56:58 -0700 >> Jaime Fernández del Río wrote: >>

Re: [Numpy-discussion] numpy.stack -- which function, if any, deserves the name?

2015-03-16 Thread Stephan Hoyer
On Mon, Mar 16, 2015 at 1:50 AM, Stefan Otte wrote: > Summarizing, my proposal is mostly concerned how to create block > arrays from given arrays. I don't care about the name "stack". I just > used "stack" because it replaced hstack/vstack for me. Maybe "bstack" > for block stack, or "barray" for

Re: [Numpy-discussion] Rewrite np.histogram in c?

2015-03-16 Thread Jaime Fernández del Río
On Mon, Mar 16, 2015 at 9:28 AM, Jerome Kieffer wrote: > On Mon, 16 Mar 2015 06:56:58 -0700 > Jaime Fernández del Río wrote: > > > Dispatching to a different method seems like a no brainer indeed. The > > question is whether we really need to do this in C. > > I need to do both unweighted & weig

Re: [Numpy-discussion] Rewrite np.histogram in c?

2015-03-16 Thread Jerome Kieffer
On Mon, 16 Mar 2015 06:56:58 -0700 Jaime Fernández del Río wrote: > Dispatching to a different method seems like a no brainer indeed. The > question is whether we really need to do this in C. I need to do both unweighted & weighted histograms and we got a factor 5 using (simple) cython: it is i

Re: [Numpy-discussion] Fastest way to compute summary statistics for a specific axis

2015-03-16 Thread Eric Moore
On Mon, Mar 16, 2015 at 11:53 AM, Dave Hirschfeld wrote: > I have a number of large arrays for which I want to compute the mean and > standard deviation over a particular axis - e.g. I want to compute the > statistics for axis=1 as if the other axes were combined so that in the > example below I

Re: [Numpy-discussion] Fastest way to compute summary statistics for a specific axis

2015-03-16 Thread Sebastian Berg
On Mo, 2015-03-16 at 15:53 +, Dave Hirschfeld wrote: > I have a number of large arrays for which I want to compute the mean and > standard deviation over a particular axis - e.g. I want to compute the > statistics for axis=1 as if the other axes were combined so that in the > example below I

Re: [Numpy-discussion] Fastest way to compute summary statistics for a specific axis

2015-03-16 Thread Oscar Benjamin
On 16 March 2015 at 15:53, Dave Hirschfeld wrote: > I have a number of large arrays for which I want to compute the mean and > standard deviation over a particular axis - e.g. I want to compute the > statistics for axis=1 as if the other axes were combined so that in the > example below I get two

[Numpy-discussion] Fastest way to compute summary statistics for a specific axis

2015-03-16 Thread Dave Hirschfeld
I have a number of large arrays for which I want to compute the mean and standard deviation over a particular axis - e.g. I want to compute the statistics for axis=1 as if the other axes were combined so that in the example below I get two values back In [1]: a = randn(30, 2, 1) For the me

Re: [Numpy-discussion] Rewrite np.histogram in c?

2015-03-16 Thread Jaime Fernández del Río
On Sun, Mar 15, 2015 at 11:06 PM, Robert McGibbon wrote: > It might make sense to dispatch to difference c implements if the bins are > equally spaced (as created by using an integer for the np.histogram bins > argument), vs. non-equally-spaced bins. > Dispatching to a different method seems lik

Re: [Numpy-discussion] numpy.stack -- which function, if any, deserves the name?

2015-03-16 Thread Nathaniel Smith
We already use the word "stack" in lots of function names to refer to something different from what bmat does. So while I definitely agree we should have something like bmat for ndarrays, it would be better all the to just pick a different name. np.block, even, might do the job. On Mar 16, 2015 1:

Re: [Numpy-discussion] numpy.stack -- which function, if any, deserves the name?

2015-03-16 Thread Stefan Otte
Hey, > 1. np.stack for stacking like np.asarray(np.bmat(...)) > http://thread.gmane.org/gmane.comp.python.numeric.general/58748/ > https://github.com/numpy/numpy/pull/5057 I'm the author of this proposal. I'll just give some context real quickly. "My stack" started really simple, basically allow