Repository: mpmath/mpmath (python)

Issue:
eig for one-dimension matrix
The returns of `eig` function are inconsistent with document when matrix.rows = 1. 
```
A = mpmath.matrix(1)
print(mpmath.eig(A, left=False, right=False))
```
This code returns `([mpf('1.0')], matrix([['1.0']]))`

Pull request description:
Skip eigenvectors if left=right=False for one-dimentional matrix
Closes #712

Patch:
diff --git a/mpmath/matrices/eigen.py b/mpmath/matrices/eigen.py
index feef27e..24230e0 100644
--- a/mpmath/matrices/eigen.py
+++ b/mpmath/matrices/eigen.py
@@ -730,6 +730,9 @@ def eig(ctx, A, left = False, right = True, overwrite_a = False):
     n = A.rows
 
     if n == 1:
+        if not (left or right):
+            return [A[0]]
+
         if left and (not right):
             return ([A[0]], ctx.matrix([[1]]))
 


Test patch:
diff --git a/mpmath/tests/test_eigen.py b/mpmath/tests/test_eigen.py
index 2daa681..c7c22f0 100644
--- a/mpmath/tests/test_eigen.py
+++ b/mpmath/tests/test_eigen.py
@@ -172,3 +172,6 @@ def test_eig():
         run_hessenberg(A, verbose = v)
         run_schur(A, verbose = v)
         run_eig(A, verbose = v)
+
+    A = mp.matrix(1)
+    assert mp.eig(A, left=False, right=False) == [0]