You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took a look at this. Both use the equal ufunc. However, x==x goes through array_richcompare() first, and array_richcompare() has extra code that is recovering from the failure.
The end of array_richcompare() (arrayobject.c, line 1433):
if (result == Py_NotImplemented) {
/* Try to handle string comparisons */
...
}
return result;
Activity
ddasilva commentedon Mar 15, 2014
I took a look at this. Both use the equal ufunc. However,
x==xgoes througharray_richcompare()first, andarray_richcompare()has extra code that is recovering from the failure.The end of
array_richcompare()(arrayobject.c, line 1433):abalkin commentedon Apr 7, 2014
So it appears that the underlying problem is that ufuncs do not work with flex arrays. For example,
charris commentedon Aug 16, 2019
See also
#4470
#3322
#3015
seberg commentedon Jan 28, 2024
Going to close this, while still true in some other cases, it isn't for strings since 1.25 or so.