numpy/numpy — pull request #3514 by seberg (2013-07-10 14:58:29+00:00)
Title: FIX: Make object comparison ufuncs not include identity check

The issue here is that PyObject_RichCompareBool does an identity
check before doing any other checks. This is good, and is the
way for example list comparisons are handled. However in numpy
comparisons are elementwise, so that the identitycheck should
not be expected. The example for this is as follows:
obj_array = np.arange(3)
a = np.array([obj_array, 0], dtype=object)
np.equal(a, a)
If an identity check is done, this returns [True, True]. But
obj_array == obj_array itself cannot be cast to a bool.

While this is slightly slower, not doing the identity check seems
more logical in the light of elementwise operations.

Closes gh-2117.

---

Just put it out there, might be that someone disagrees with this change. Remembered it because of that NaN inside object arrays discussion.