Message167912
Martin v. Loewis <report@bugs.python.org> wrote:
> Sure: someone would have to make a proposal what exactly that is.
> IMO, the 3.2 definition *was* simple, but apparently it was considered
> too simple.
It was simply broken in multiple ways. Example:
>>> from numpy import *
>>> x = array([1,2,3,4,5], dtype='B')
>>> y = array([5,4,3,2,1], dtype='B')
>>> z = y[::-1]
>>>
>>> x == z
array([ True, True, True, True, True], dtype=bool)
>>> memoryview(x) == memoryview(z)
False
Segmentation fault
I'm not even talking about the segfault here. Note that x == z, but
memoryview(x) != memoryview(z), because the logical structure is
not taken into account.
Likewise, one could construct cases where one array contains a float
NaN and the other an integer that happens to have the same bit pattern.
The arrays would not be equal, but their memoryviews would be equal.
> So either Stefan gets to define his view of equality, or
> somebody else needs to make a (specific) counter-proposal.
The view is defined by the PEP that clearly models NumPy. I'm curious what
counter-proposal will work with NumPy and PIL. |
|
Date |
User |
Action |
Args |
2012-08-10 20:53:43 | skrah | set | recipients:
+ skrah, loewis, georg.brandl, mark.dickinson, ncoghlan, pitrou, vstinner, christian.heimes, Arfrever, meador.inge, python-dev |
2012-08-10 20:53:42 | skrah | set | messageid: <1344632022.73.0.465608137429.issue15573@psf.upfronthosting.co.za> |
2012-08-10 20:53:42 | skrah | link | issue15573 messages |
2012-08-10 20:53:40 | skrah | create | |
|