[Numpy-discussion] (no subject)

2014-09-18 Thread Petr Viktorin
Hello, Over at Python-ideas, there is a thread [0] about the following discrepancy: numpy.array(float('inf')) // 1 inf float('inf') // 1 nan There are reasons for either result, but I believe it would be very nice if either Python or Numpy changed, so they would give the same value. If any of

[Numpy-discussion] float('inf') // 1 = ?

2014-09-18 Thread Petr Viktorin
(Apologies for the lack of subject earlier) Hello, Over at Python-ideas, there is a thread [0] about the following discrepancy: numpy.array(float('inf')) // 1 inf float('inf') // 1 nan There are reasons for either result, but I believe it would be very nice if either Python or Numpy changed,

Re: [Numpy-discussion] (no subject)

2014-09-18 Thread Benjamin Root
My vote is that NumPy is correct here. I see no reason why float('inf') / 1 and float('inf') // 1 should return different results. Ben Root On Thu, Sep 18, 2014 at 12:31 PM, Petr Viktorin encu...@gmail.com wrote: Hello, Over at Python-ideas, there is a thread [0] about the following

Re: [Numpy-discussion] float('inf') // 1 = ?

2014-09-18 Thread Petr Viktorin
Sorry for the lack of subject before. On Thu, Sep 18, 2014 at 6:48 PM, Benjamin Root ben.r...@ou.edu wrote: My vote is that NumPy is correct here. I see no reason why float('inf') / 1 and float('inf') // 1 should return different results. I recommend reading the python-ideas thread; there

Re: [Numpy-discussion] (no subject)

2014-09-18 Thread Chris Barker
Well, First of all, numpy and the python math module have a number of differences when it comes to handling these kind of special cases -- and I think that: 1) numpy needs to do what makes the most sense for numpy and NOT mirror the math lib. 2) the use-cases of the math lib and numpy are

Re: [Numpy-discussion] float('inf') // 1 = ?

2014-09-18 Thread Sebastian Berg
On Thu, 2014-09-18 at 18:55 +0200, Petr Viktorin wrote: Sorry for the lack of subject before. On Thu, Sep 18, 2014 at 6:48 PM, Benjamin Root ben.r...@ou.edu wrote: My vote is that NumPy is correct here. I see no reason why float('inf') / 1 and float('inf') // 1 Didn't read python

Re: [Numpy-discussion] (no subject)

2014-09-18 Thread Jonathan Helmus
On 09/18/2014 12:01 PM, Chris Barker wrote: Well, First of all, numpy and the python math module have a number of differences when it comes to handling these kind of special cases -- and I think that: 1) numpy needs to do what makes the most sense for numpy and NOT mirror the math lib.

Re: [Numpy-discussion] (no subject)

2014-09-18 Thread Petr Viktorin
On Thu, Sep 18, 2014 at 7:14 PM, Jonathan Helmus jjhel...@gmail.com wrote: On 09/18/2014 12:01 PM, Chris Barker wrote: Well, First of all, numpy and the python math module have a number of differences when it comes to handling these kind of special cases -- and I think that: 1) numpy needs

Re: [Numpy-discussion] (no subject)

2014-09-18 Thread Chris Barker
On Thu, Sep 18, 2014 at 10:44 AM, Petr Viktorin encu...@gmail.com wrote: 2) the use-cases of the math lib and numpy are different, so they maybe _should_ have different handling of this kind of thing. If you have a reason for the difference, I'd like to hear it. For one, numpy does array

Re: [Numpy-discussion] float('inf') // 1 = ?

2014-09-18 Thread Sebastian Berg
On Do, 2014-09-18 at 19:13 +0200, Sebastian Berg wrote: On Thu, 2014-09-18 at 18:55 +0200, Petr Viktorin wrote: Sorry for the lack of subject before. On Thu, Sep 18, 2014 at 6:48 PM, Benjamin Root ben.r...@ou.edu wrote: My vote is that NumPy is correct here. I see no reason why

Re: [Numpy-discussion] (no subject)

2014-09-18 Thread Jonathan Helmus
On 09/18/2014 12:44 PM, Petr Viktorin wrote: On Thu, Sep 18, 2014 at 7:14 PM, Jonathan Helmus jjhel...@gmail.com wrote: On 09/18/2014 12:01 PM, Chris Barker wrote: Well, First of all, numpy and the python math module have a number of differences when it comes to handling these kind of

Re: [Numpy-discussion] (no subject)

2014-09-18 Thread Ian Henriksen
On Thu, Sep 18, 2014 at 1:30 PM, Jonathan Helmus jjhel...@gmail.com wrote: On 09/18/2014 12:44 PM, Petr Viktorin wrote: On Thu, Sep 18, 2014 at 7:14 PM, Jonathan Helmus jjhel...@gmail.com wrote: On 09/18/2014 12:01 PM, Chris Barker wrote: Well, First of all, numpy and the python