diff options
-rw-r--r-- | lib/Data/Packed/Vector.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Data/Packed/Vector.hs b/lib/Data/Packed/Vector.hs index 7264528..4f25b6f 100644 --- a/lib/Data/Packed/Vector.hs +++ b/lib/Data/Packed/Vector.hs | |||
@@ -43,7 +43,8 @@ chunk = 5000 | |||
43 | 43 | ||
44 | chunks :: Int -> [Int] | 44 | chunks :: Int -> [Int] |
45 | chunks d = let c = d `div` chunk | 45 | chunks d = let c = d `div` chunk |
46 | in ((d-c*chunk):(replicate c chunk)) | 46 | m = d `mod` chunk |
47 | in if m /= 0 then reverse (m:(replicate c chunk)) else (replicate c chunk) | ||
47 | 48 | ||
48 | putVector v = do | 49 | putVector v = do |
49 | let d = dim v | 50 | let d = dim v |