Deal with situations in which sigma is a vector.

Also: added a test which currently fails on real data. Not so sure how to set
sigma here, but I am going to leave this here as a wish.
DOC: Clarify and prettify documentation, and some indentation in the code.