Port subsample function
Merge branch 'master' into subsample

Conflicts:
	doc/source/index.rst
improve docstrings based on @ElDeveloper's comments
added Raises section

Thanks @ElDeveloper and @gregcaporaso, you two are bros.
Merge pull request #193 from ElBrogrammer/subsample

Port subsample function