Re: [Numpy-discussion] New behavior of allclose

2015-11-05 Thread Charles R Harris
On Thu, Nov 5, 2015 at 2:50 PM, Ralf Gommers wrote: > > > On Wed, Nov 4, 2015 at 8:28 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> Hi All, >> >> This is to open a discussion of a change of behavior of `np.allclose`. >> That function uses `isclose` in numpy 1.10 with the result

Re: [Numpy-discussion] New behavior of allclose

2015-11-05 Thread Benjamin Root
allclose() needs to return a bool so that one can do "if np.allclose(foo, bar) is True" or some such. The "good behavior" is for np.isclose() to return a memmap, which still confuses the heck out of me, but I am not a memmap expert. On Thu, Nov 5, 2015 at 4:50 PM, Ralf Gommers wrote: > > > On We

Re: [Numpy-discussion] New behavior of allclose

2015-11-05 Thread Ralf Gommers
On Wed, Nov 4, 2015 at 8:28 PM, Charles R Harris wrote: > Hi All, > > This is to open a discussion of a change of behavior of `np.allclose`. > That function uses `isclose` in numpy 1.10 with the result that array > subtypes are preserved whereas before they were not. In particular, memmaps > are

Re: [Numpy-discussion] New behavior of allclose

2015-11-04 Thread Nathan Goldbaum
Yup, https://github.com/numpy/numpy/issues/6196 On Wed, Nov 4, 2015 at 1:45 PM, Charles R Harris wrote: > > > On Wed, Nov 4, 2015 at 12:42 PM, Nathan Goldbaum > wrote: > >> Oh oops, this is about np.allcose, not np.assert_allclose. Sorry for the >> noise... >> > > Probably related ;) Did you op

Re: [Numpy-discussion] New behavior of allclose

2015-11-04 Thread Charles R Harris
On Wed, Nov 4, 2015 at 12:42 PM, Nathan Goldbaum wrote: > Oh oops, this is about np.allcose, not np.assert_allclose. Sorry for the > noise... > Probably related ;) Did you open an issue for it? Chuck ___ NumPy-Discussion mailing list NumPy-Discussion@

Re: [Numpy-discussion] New behavior of allclose

2015-11-04 Thread Charles R Harris
On Wed, Nov 4, 2015 at 12:40 PM, Benjamin Root wrote: > I am not sure I understand what you mean. Specifically that np.isclose > will return a memmap if one of the inputs is a memmap. The result is a > brand new array, right? So, what is that result memmapping from? Also, how > does this impact n

Re: [Numpy-discussion] New behavior of allclose

2015-11-04 Thread Nathan Goldbaum
Oh oops, this is about np.allcose, not np.assert_allclose. Sorry for the noise... On Wed, Nov 4, 2015 at 1:36 PM, Nathan Goldbaum wrote: > I actually brought this up before 1.10 came out: > https://github.com/numpy/numpy/issues/6196 > > The behavior change brought out a bug in our use of allclos

Re: [Numpy-discussion] New behavior of allclose

2015-11-04 Thread Benjamin Root
I am not sure I understand what you mean. Specifically that np.isclose will return a memmap if one of the inputs is a memmap. The result is a brand new array, right? So, what is that result memmapping from? Also, how does this impact np.allclose()? That function returns a scalar True/False, so what

Re: [Numpy-discussion] New behavior of allclose

2015-11-04 Thread Nathan Goldbaum
I actually brought this up before 1.10 came out: https://github.com/numpy/numpy/issues/6196 The behavior change brought out a bug in our use of allclose, so while it was annoying in the sense that our test suite started failing in a new way, it was good in that our tests are now more correct. On

[Numpy-discussion] New behavior of allclose

2015-11-04 Thread Charles R Harris
Hi All, This is to open a discussion of a change of behavior of `np.allclose`. That function uses `isclose` in numpy 1.10 with the result that array subtypes are preserved whereas before they were not. In particular, memmaps are returned when at least one of the inputs is a memmap. By and large I