numpy/numpy — pull request #4711 by pv (2014-05-14 18:44:22+00:00)
Title: BUG: core: allow scalar type richcompare to call ndarray-subclass methods

This makes the scalar richcmp behave exactly as
"array(self) other". The difference comes in when "other" is an ndarray
subclass, in which case this change allows the subclass to override the
comparison operations via usual Python binop dispatch rules.

Fixes gh-4709