Is this 'if' needed? numpy should understand a vector with a single element as a scalar, right? I don't like a function sometimes returning scalars and sometimes vectors. Best to return vectors always, possibly with a single element.