Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-13 Thread Mark Wiebe
On Tue, Apr 12, 2011 at 11:51 AM, Mark Wiebe mwwi...@gmail.com wrote: snip here's the rule for a set of arbitrary arrays (not necessarily just 2): - if all the arrays are scalars, do type promotion on the types as is - otherwise, do type promotion on min_scalar_type(a) of each array a The

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-13 Thread Mark Wiebe
On Wed, Apr 13, 2011 at 3:34 PM, Mark Wiebe mwwi...@gmail.com wrote: On Tue, Apr 12, 2011 at 11:51 AM, Mark Wiebe mwwi...@gmail.com wrote: snip here's the rule for a set of arbitrary arrays (not necessarily just 2): - if all the arrays are scalars, do type promotion on the types as is -

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-12 Thread Robert Kern
On Mon, Apr 11, 2011 at 23:43, Mark Wiebe mwwi...@gmail.com wrote: On Mon, Apr 11, 2011 at 8:48 PM, Travis Oliphant oliph...@enthought.com wrote: It would be good to see a simple test case and understand why the boolean multiplied by the scalar double is becoming a float16.     In other

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-12 Thread Robert Kern
On Tue, Apr 12, 2011 at 11:20, Mark Wiebe mwwi...@gmail.com wrote: On Tue, Apr 12, 2011 at 8:24 AM, Robert Kern robert.k...@gmail.com wrote: On Mon, Apr 11, 2011 at 23:43, Mark Wiebe mwwi...@gmail.com wrote: On Mon, Apr 11, 2011 at 8:48 PM, Travis Oliphant oliph...@enthought.com wrote:

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-12 Thread Mark Wiebe
On Tue, Apr 12, 2011 at 9:30 AM, Robert Kern robert.k...@gmail.com wrote: On Tue, Apr 12, 2011 at 11:20, Mark Wiebe mwwi...@gmail.com wrote: On Tue, Apr 12, 2011 at 8:24 AM, Robert Kern robert.k...@gmail.com wrote: On Mon, Apr 11, 2011 at 23:43, Mark Wiebe mwwi...@gmail.com wrote: On

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-12 Thread Charles R Harris
On Tue, Apr 12, 2011 at 10:49 AM, Mark Wiebe mwwi...@gmail.com wrote: On Tue, Apr 12, 2011 at 9:30 AM, Robert Kern robert.k...@gmail.comwrote: On Tue, Apr 12, 2011 at 11:20, Mark Wiebe mwwi...@gmail.com wrote: On Tue, Apr 12, 2011 at 8:24 AM, Robert Kern robert.k...@gmail.com wrote: On

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-12 Thread Charles R Harris
On Tue, Apr 12, 2011 at 10:20 AM, Mark Wiebe mwwi...@gmail.com wrote: On Tue, Apr 12, 2011 at 8:24 AM, Robert Kern robert.k...@gmail.comwrote: On Mon, Apr 11, 2011 at 23:43, Mark Wiebe mwwi...@gmail.com wrote: On Mon, Apr 11, 2011 at 8:48 PM, Travis Oliphant oliph...@enthought.com wrote:

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-12 Thread Robert Kern
On Tue, Apr 12, 2011 at 12:27, Charles R Harris charlesr.har...@gmail.com wrote: IIRC, the behavior with respect to scalars sort of happened in the code on the fly, so this is a good discussion to have. We should end up with documented rules and tests to enforce them. I agree with Mark that

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-12 Thread Charles R Harris
On Tue, Apr 12, 2011 at 11:56 AM, Robert Kern robert.k...@gmail.com wrote: On Tue, Apr 12, 2011 at 12:27, Charles R Harris charlesr.har...@gmail.com wrote: IIRC, the behavior with respect to scalars sort of happened in the code on the fly, so this is a good discussion to have. We should

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-12 Thread Mark Wiebe
On Tue, Apr 12, 2011 at 11:17 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Apr 12, 2011 at 11:56 AM, Robert Kern robert.k...@gmail.comwrote: On Tue, Apr 12, 2011 at 12:27, Charles R Harris charlesr.har...@gmail.com wrote: IIRC, the behavior with respect to scalars sort

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-12 Thread Robert Kern
On Tue, Apr 12, 2011 at 11:49, Mark Wiebe mwwi...@gmail.com wrote: On Tue, Apr 12, 2011 at 9:30 AM, Robert Kern robert.k...@gmail.com wrote: You're missing the key part of the rule that numpy uses: for array*scalar cases, when both array and scalar are the same kind (both floating point or

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-12 Thread Robert Kern
On Tue, Apr 12, 2011 at 13:17, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Apr 12, 2011 at 11:56 AM, Robert Kern robert.k...@gmail.com wrote: On Tue, Apr 12, 2011 at 12:27, Charles R Harris charlesr.har...@gmail.com wrote: IIRC, the behavior with respect to scalars sort of

[Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-11 Thread Skipper Seabold
All, We noticed some failing tests for statsmodels between numpy 1.5.1 and numpy = 1.6.0. These are the versions where I noticed the change. It seems that when you divide a float array and multiply by a boolean array the answers are different (unless the others are also off by some floating

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-11 Thread Robert Kern
On Mon, Apr 11, 2011 at 13:54, Skipper Seabold jsseab...@gmail.com wrote: All, We noticed some failing tests for statsmodels between numpy 1.5.1 and numpy = 1.6.0. These are the versions where I noticed the change. It seems that when you divide a float array and multiply by a boolean array

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-11 Thread Charles R Harris
On Mon, Apr 11, 2011 at 12:54 PM, Skipper Seabold jsseab...@gmail.comwrote: All, We noticed some failing tests for statsmodels between numpy 1.5.1 and numpy = 1.6.0. These are the versions where I noticed the change. It seems that when you divide a float array and multiply by a boolean

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-11 Thread Mark Wiebe
On Mon, Apr 11, 2011 at 12:37 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Apr 11, 2011 at 13:54, Skipper Seabold jsseab...@gmail.com wrote: All, We noticed some failing tests for statsmodels between numpy 1.5.1 and numpy = 1.6.0. These are the versions where I noticed the

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-11 Thread Charles R Harris
On Mon, Apr 11, 2011 at 2:31 PM, Mark Wiebe mwwi...@gmail.com wrote: On Mon, Apr 11, 2011 at 12:37 PM, Robert Kern robert.k...@gmail.comwrote: On Mon, Apr 11, 2011 at 13:54, Skipper Seabold jsseab...@gmail.com wrote: All, We noticed some failing tests for statsmodels between numpy 1.5.1

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-11 Thread Travis Oliphant
On Apr 11, 2011, at 3:55 PM, Charles R Harris wrote: On Mon, Apr 11, 2011 at 2:31 PM, Mark Wiebe mwwi...@gmail.com wrote: On Mon, Apr 11, 2011 at 12:37 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Apr 11, 2011 at 13:54, Skipper Seabold jsseab...@gmail.com wrote: All, We

Re: [Numpy-discussion] Odd numerical difference between Numpy 1.5.1 and Numpy 1.5.1

2011-04-11 Thread Mark Wiebe
On Mon, Apr 11, 2011 at 8:48 PM, Travis Oliphant oliph...@enthought.comwrote: On Apr 11, 2011, at 3:55 PM, Charles R Harris wrote: snip I agree with Charles. Let's take the needed time and work this through. This is the sort of thing I was a bit nervous about with the changes made to the