I think `peak_local_max` is doing a lot of extra things which are unnecessary for the specific operation of blob detection. And it's also doing a lot of operations assuming that the input is a 2D array