diff options
author | Alberto Ruiz <aruiz@um.es> | 2014-09-07 14:25:07 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2014-09-07 14:25:07 +0200 |
commit | 225901798773228e73b4c98670d56e844c040b3d (patch) | |
tree | 4eb48639cfcf6eb7fdc98cf3514231f22591840c /packages/base/src/Numeric/LinearAlgebra/Static | |
parent | aa9e29a5fc728965811557652a409338c792b609 (diff) |
fix diagRectR/C (eye), check zero cols in in gmat(fromList-matrix), and thanks
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Static')
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs b/packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs index 339ef7d..ec02cf6 100644 --- a/packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Static/Internal.hs | |||
@@ -150,7 +150,7 @@ gmat st xs' | |||
150 | (xs,rest) = splitAt (m'*n') xs' | 150 | (xs,rest) = splitAt (m'*n') xs' |
151 | v = LA.fromList xs | 151 | v = LA.fromList xs |
152 | x = reshape n' v | 152 | x = reshape n' v |
153 | ok = rem (LA.size v) n' == 0 && LA.size x == (m',n') && null rest | 153 | ok = null rest && ((n' == 0 && dim v == 0) || n'> 0 && (rem (LA.size v) n' == 0) && LA.size x == (m',n')) |
154 | m' = fromIntegral . natVal $ (undefined :: Proxy m) :: Int | 154 | m' = fromIntegral . natVal $ (undefined :: Proxy m) :: Int |
155 | n' = fromIntegral . natVal $ (undefined :: Proxy n) :: Int | 155 | n' = fromIntegral . natVal $ (undefined :: Proxy n) :: Int |
156 | abort info = error $ st ++" "++show m' ++ " " ++ show n'++" can't be created from elements " ++ info | 156 | abort info = error $ st ++" "++show m' ++ " " ++ show n'++" can't be created from elements " ++ info |