OPT: reduced the number of np.asarray(...) calls (the python profiler found it was a hot spot). DOC: updated documentation according to latest comments.