numpy/numpy — pull request #185 by charris (2012-01-19 00:24:05+00:00)
Title: BUG: Fix ticket #2021.

The return from PyArray_DescrFromObject PyArray_SearchSorted needed
to be checked for NULL. Also added checks in other spots where
PyArray_DescrFromObject was called. Added regression test for same.
Made a few small code cleanups along the way.

All the checks may not be necessary, but...
1) No one should have to waste brain cycles figuring that out.
2) Bugs happen.
3) Things change.