diff options
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 |