code: def inv(self):
          
          if self.det == 0:
              raise ValueError("SquareTensor is non-invertible")
          return SquareTensor(np.linalg.inv(self))
docs: shorthand for matrix inverse on SquareTensor