Allow permutation to return just one permutation.

fix gh-2158
Should that special case be put in `_infer_ndim_bcast` instead? Then it could be re-used by other distributions.