Every function should have a doc string (in the numpy format https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt) explaining what it does, the arguments it takes and what those do as well as what it returns. Preferably with a small example code snippet.