Added documentation for mode()
This relates to issue  #9750

Thanks for the feedback, shoyer. I have added a new commit. Hopefully it is fine now :)
 Thanks, shoyer. Hopefully it is ok now?
 Merged, thanks!
