code: function inv(A) {
      if (A.shape.length !== 2) {
          throw new Error('Input is not matrix');
      }
      if (A.shape[0] !== A.shape[1]) {
          throw new Error('Input is not square matrix');
      }
      var copyA = A.clone();
      copyA.swapOrder();
      var n = A.shape[0];
      var I = common_1.eye(n);
      lapack.gesv(copyA.data, I.data, n, n);
      I.swapOrder();
      return I;
  }
docs: Compute (multiplicative) inverse of given matrix
  @param A Square matrix whose inverse is to be found