Otsu working with numpy.histogram function