TensorInv

Added tensorinv function.
why did you remove this empty line? It is needed by pep8.