[Numpy-discussion] New behavior of allclose
ben.v.root at gmail.com
Thu Nov 5 17:00:34 EST 2015
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
On Thu, Nov 5, 2015 at 4:50 PM, Ralf Gommers <ralf.gommers at gmail.com> wrote:
> On Wed, Nov 4, 2015 at 8:28 PM, Charles R Harris <
> charlesr.harris at 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 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
>> think this is a good thing, OTOH, it is a change in behavior. It is easy to
>> fix, just run `np.array(result, copy=False)` on the current `result`, but I
>> thought I'd raise the topic on the list in case there is a good argument to
>> change things.
> Why would it be good to return a memmap? And am I confused or does your
> just merged PR  revert the behavior you say here is a good thing?
>  https://github.com/numpy/numpy/pull/6628
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion