diff options
Diffstat (limited to 'lib/Data/Packed')
-rw-r--r-- | lib/Data/Packed/Internal/Matrix.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs index d4b0bc1..a39c0f0 100644 --- a/lib/Data/Packed/Internal/Matrix.hs +++ b/lib/Data/Packed/Internal/Matrix.hs | |||
@@ -207,12 +207,12 @@ atM' MF {irows = r, fdat = v} i j = v `at'` (j*r+i) | |||
207 | ------------------------------------------------------------------ | 207 | ------------------------------------------------------------------ |
208 | 208 | ||
209 | matrixFromVector RowMajor c v = MC { irows = r, icols = c, cdat = v } | 209 | matrixFromVector RowMajor c v = MC { irows = r, icols = c, cdat = v } |
210 | where (d,m) = dim v `divMod` c | 210 | where (d,m) = dim v `quotRem` c |
211 | r | m==0 = d | 211 | r | m==0 = d |
212 | | otherwise = error "matrixFromVector" | 212 | | otherwise = error "matrixFromVector" |
213 | 213 | ||
214 | matrixFromVector ColumnMajor c v = MF { irows = r, icols = c, fdat = v } | 214 | matrixFromVector ColumnMajor c v = MF { irows = r, icols = c, fdat = v } |
215 | where (d,m) = dim v `divMod` c | 215 | where (d,m) = dim v `quotRem` c |
216 | r | m==0 = d | 216 | r | m==0 = d |
217 | | otherwise = error "matrixFromVector" | 217 | | otherwise = error "matrixFromVector" |
218 | 218 | ||