change interpolate_2d and _maybe_upcast_putmask to assertion errors

Potentially need to check whether these are actually unreachable in
normal code...