ENH: If a ufunc reduces frame to 0-d, return scalar. Needed for ndimage.