In my opinion we should add the 3D functionality to peak_local_max... There is no reason to separate this functionality in two functions?