Add median().

Refs #31
Add docstrings for numerical functions.

Refs #31