Sure, but a few lines above, there is `N = arr.shape[axis]`, so an invalid axis argument would raise an exception anyway. Do you think that protection is sufficient, or would you prefer a more explicit check?