summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Convert.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Data/Packed/Convert.hs')
-rw-r--r--lib/Data/Packed/Convert.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Data/Packed/Convert.hs b/lib/Data/Packed/Convert.hs
index 206fa06..8f0eef6 100644
--- a/lib/Data/Packed/Convert.hs
+++ b/lib/Data/Packed/Convert.hs
@@ -29,7 +29,6 @@ import Data.Array.Storable
29import Foreign 29import Foreign
30import Control.Monad.ST 30import Control.Monad.ST
31import Data.Array.ST 31import Data.Array.ST
32import Data.Array.IArray
33import Data.Array.Unboxed 32import Data.Array.Unboxed
34 33
35-- | Creates a StorableArray indexed from 0 to dim -1. 34-- | Creates a StorableArray indexed from 0 to dim -1.
@@ -88,7 +87,7 @@ vectorFromMArray x = fmap vectorFromArray (unsafeFreeze' x)
88matrixFromArray :: UArray (Int, Int) Double -> Matrix Double 87matrixFromArray :: UArray (Int, Int) Double -> Matrix Double
89matrixFromArray m = reshape c . fromList . elems $ m 88matrixFromArray m = reshape c . fromList . elems $ m
90 where ((r1,c1),(r2,c2)) = bounds m 89 where ((r1,c1),(r2,c2)) = bounds m
91 r = r2-r1+1 90 _r = r2-r1+1
92 c = c2-c1+1 91 c = c2-c1+1
93 92
94arrayFromMatrix :: Matrix Double -> UArray (Int, Int) Double 93arrayFromMatrix :: Matrix Double -> UArray (Int, Int) Double