summaryrefslogtreecommitdiff
path: root/lib/LAPACK/Internal.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/LAPACK/Internal.hs')
-rw-r--r--lib/LAPACK/Internal.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/LAPACK/Internal.hs b/lib/LAPACK/Internal.hs
index e39dd10..e3c9927 100644
--- a/lib/LAPACK/Internal.hs
+++ b/lib/LAPACK/Internal.hs
@@ -76,7 +76,9 @@ foreign import ccall "lapack-aux.h eig_l_C"
76-- The eigenvectors are the columns of v. 76-- The eigenvectors are the columns of v.
77-- The eigenvalues are not sorted. 77-- The eigenvalues are not sorted.
78eigC :: Matrix (Complex Double) -> (Vector (Complex Double), Matrix (Complex Double)) 78eigC :: Matrix (Complex Double) -> (Vector (Complex Double), Matrix (Complex Double))
79eigC (m@M {rows = r}) = unsafePerformIO $ do 79eigC (m@M {rows = r})
80 | r == 1 = (fromList [cdat m `at` 0], singleton 1)
81 | otherwise = unsafePerformIO $ do
80 l <- createVector r 82 l <- createVector r
81 v <- createMatrix ColumnMajor r r 83 v <- createMatrix ColumnMajor r r
82 dummy <- createMatrix ColumnMajor 1 1 84 dummy <- createMatrix ColumnMajor 1 1