Added least squares and pseudo inverse.

That also involved patching the wrapper scripts to be able to deal with strings... .