CLN: unreachable code in algos.diff
it looks like some code is unreachable following #37140 (assuming 1d or 2d only) cc @jbrockmendel 
nice cleanup, LGTM pending green(ish) nice, thanks @simonjayhawkins 