BUG: digitize segfaults on TypeError

The new searchsorted-based digitize introduced in #5101 segfaults
when it should raise a TypeError.

Should be backported to 1.9.x.
Ahh, it is.