Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-02 Thread Nathaniel Smith
On 1 May 2013 23:12, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, May 1, 2013 at 7:10 PM, Benjamin Root ben.r...@ou.edu wrote: So, to summarize the thread so far: Consensus: np.nanmean() np.nanstd() np.minmax() np.argminmax() Vague Consensus: np.sincos() If the

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-02 Thread Sebastian Berg
On Thu, 2013-05-02 at 07:03 -0400, Nathaniel Smith wrote: On 1 May 2013 23:12, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, May 1, 2013 at 7:10 PM, Benjamin Root ben.r...@ou.edu wrote: So, to summarize the thread so far: Consensus: np.nanmean() np.nanstd()

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-02 Thread Charles R Harris
On Thu, May 2, 2013 at 7:28 AM, Robert Kern robert.k...@gmail.com wrote: On Thu, May 2, 2013 at 12:03 PM, Nathaniel Smith n...@pobox.com wrote: On 1 May 2013 23:12, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, May 1, 2013 at 7:10 PM, Benjamin Root ben.r...@ou.edu wrote:

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-02 Thread Robert Kern
On Thu, May 2, 2013 at 2:38 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, May 2, 2013 at 7:28 AM, Robert Kern robert.k...@gmail.com wrote: On Thu, May 2, 2013 at 12:03 PM, Nathaniel Smith n...@pobox.com wrote: On 1 May 2013 23:12, Charles R Harris charlesr.har...@gmail.com

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-02 Thread Charles R Harris
On Thu, May 2, 2013 at 7:47 AM, Robert Kern robert.k...@gmail.com wrote: On Thu, May 2, 2013 at 2:38 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, May 2, 2013 at 7:28 AM, Robert Kern robert.k...@gmail.com wrote: On Thu, May 2, 2013 at 12:03 PM, Nathaniel Smith

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-02 Thread Robert Kern
On Thu, May 2, 2013 at 3:28 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, May 2, 2013 at 7:47 AM, Robert Kern robert.k...@gmail.com wrote: On Thu, May 2, 2013 at 2:38 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, May 2, 2013 at 7:28 AM, Robert Kern

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-02 Thread Charles R Harris
On Thu, May 2, 2013 at 8:40 AM, Robert Kern robert.k...@gmail.com wrote: On Thu, May 2, 2013 at 3:28 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, May 2, 2013 at 7:47 AM, Robert Kern robert.k...@gmail.com wrote: On Thu, May 2, 2013 at 2:38 PM, Charles R Harris

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-02 Thread Robert Kern
On Thu, May 2, 2013 at 3:57 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, May 2, 2013 at 8:40 AM, Robert Kern robert.k...@gmail.com wrote: On Thu, May 2, 2013 at 3:28 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, May 2, 2013 at 7:47 AM, Robert Kern

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Benjamin Root
On Wed, May 1, 2013 at 1:13 AM, Chris Barker - NOAA Federal chris.bar...@noaa.gov wrote: Of course, the documentation for discussed before: np.minmax(). My thinking is that it would return a 2xN array How about a tuple: (min, max)? I am not familiar enough with numpy internals to know

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Daπid
On 1 May 2013 03:36, Benjamin Root ben.r...@ou.edu wrote: Are there any other functions that others feel are missing from numpy and would like to see for v1.8? Let's discuss them here. I would like to have sincos, to compute sin and cos of the same number faster. According to some benchmarks,

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Juan Luis Cano
On 05/01/2013 04:14 PM, Daπid wrote: On 1 May 2013 03:36, Benjamin Root ben.r...@ou.edu wrote: Are there any other functions that others feel are missing from numpy and would like to see for v1.8? Let's discuss them here. I would like to have sincos, to compute sin and cos of the same number

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Zachary Ploskey
The sincos function is in the c standard library in math.h. On May 1, 2013 7:56 AM, Juan Luis Cano juanlu...@gmail.com wrote: On 05/01/2013 04:14 PM, Daπid wrote: On 1 May 2013 03:36, Benjamin Root ben.r...@ou.edu wrote: Are there any other functions that others feel are missing from numpy

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Todd
On Wed, May 1, 2013 at 3:36 AM, Benjamin Root ben.r...@ou.edu wrote: Are there any other functions that others feel are missing from numpy and would like to see for v1.8? Let's discuss them here. As I mentioned before, I think numpy should have some equations for dealing with n-dimensional

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Robert Kern
On Wed, May 1, 2013 at 4:06 PM, Zachary Ploskey zplos...@gmail.com wrote: The sincos function is in the c standard library in math.h. I don't think it's part of the C99 standard. It appears to be provided in glibc as a non-standard extension. We would have to provide our own copy, but one is

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Daπid
On 1 May 2013 17:13, Todd toddr...@gmail.com wrote: Speaking of which, I think there should be a function to construct a complex array out of two identically-shaped floating-point arrays, as well as perhaps an np.i class that converts a real array to an imaginary one (using __mul__ and such).

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Todd
On Wed, May 1, 2013 at 5:22 PM, Daπid davidmen...@gmail.com wrote: On 1 May 2013 17:13, Todd toddr...@gmail.com wrote: Speaking of which, I think there should be a function to construct a complex array out of two identically-shaped floating-point arrays, as well as perhaps an np.i class

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Robert Kern
On Wed, May 1, 2013 at 4:22 PM, Daπid davidmen...@gmail.com wrote: On 1 May 2013 17:13, Todd toddr...@gmail.com wrote: Speaking of which, I think there should be a function to construct a complex array out of two identically-shaped floating-point arrays, as well as perhaps an np.i class that

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Warren Weckesser
On Wed, May 1, 2013 at 10:14 AM, Daπid davidmen...@gmail.com wrote: On 1 May 2013 03:36, Benjamin Root ben.r...@ou.edu wrote: Are there any other functions that others feel are missing from numpy and would like to see for v1.8? Let's discuss them here. I would like to have sincos, to

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Chris Barker - NOAA Federal
On Wed, May 1, 2013 at 6:52 AM, Benjamin Root ben.r...@ou.edu wrote: How about a tuple: (min, max)? I am not familiar enough with numpy internals to know which is the better approach to implement. I kind of feel that the 2xN array approach would be more flexible in case a user wants all

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Benjamin Root
So, to summarize the thread so far: Consensus: np.nanmean() np.nanstd() np.minmax() np.argminmax() Vague Consensus: np.sincos() No Consensus (possibly out of scope for this topic): Better constructors for complex types I can probably whip up the PR for the nanmean() and nanstd(), and can

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Charles R Harris
On Wed, May 1, 2013 at 7:10 PM, Benjamin Root ben.r...@ou.edu wrote: So, to summarize the thread so far: Consensus: np.nanmean() np.nanstd() np.minmax() np.argminmax() Vague Consensus: np.sincos() If the return of sincos (cossin?) is an array, then it could be reshaped to be

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Benjamin Root
I have created a PR for the first two (and got np.nanvar() for free). https://github.com/numpy/numpy/pull/3297 Cheers! Ben Root ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-04-30 Thread Benjamin Root
Currently, I am in the process of migrating some co-workers from Matlab and IDL, and the number one complaint I get is that numpy has nansum() but no nanmean() and nanstd(). While we do have an alternative in the form of masked arrays, most of these people are busy enough trying to port their

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-04-30 Thread Daπid
On 1 May 2013 03:36, Benjamin Root ben.r...@ou.edu wrote: There is one other non-trivial function that have been discussed before: np.minmax(). My thinking is that it would return a 2xN array (where N is whatever size of the result that would be returned if just np.min() was used). This

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-04-30 Thread Chris Barker - NOAA Federal
On Apr 30, 2013, at 6:37 PM, Benjamin Root ben.r...@ou.edu wrote: I can not think of any reason not to include these functions in v1.8. +1 Of course, the documentation for discussed before: np.minmax(). My thinking is that it would return a 2xN array How about a tuple: (min, max)? -Chris