Histogram values of ImageJ via Python (Mode)

I would like to get the histogram values of an grayscale image analized by ImageJ automatically with a Python script.
With the following code I have made it to get the correct values of mean, std dev, count, min and max:
np.mean(hist).item(),
np.std(hist).item(),
len(hist)*len(hist),
np.min(hist).item(),
np.max(hist).item()
Unfortunately with that code I get not the value of the mode (highest bin of the histogram [value of the bin (0-256) and amount of pixels]):
np.argmax(hist).item()
I think (hope) that a small piece of code could fix my request.