I agree. However, there are two other functions in this file that implement it this way: medfilt, medfilt2d. Should I change those as well?