TensorInv

Added tensorinv function.
the output type isn't the good one. The output don't have the same number of dimensions as the input. Do something like:

out_var = TensorType(dtype=x.dtype, broadcastable=x.broadcastable[:ind]+x.broadcastable[ind:])()