summaryrefslogtreecommitdiff
path: root/lib/Data/Packed
diff options
context:
space:
mode:
authorVivian McPhail <haskell.vivian.mcphail@gmail.com>2010-07-02 10:42:54 +0000
committerVivian McPhail <haskell.vivian.mcphail@gmail.com>2010-07-02 10:42:54 +0000
commitdd054da0524abdb14d013c9f9f43272515b77b6e (patch)
treebd61cf48e912d74eab1c46080354d5fc795d2496 /lib/Data/Packed
parentfc6e8a553c99f50768b49c8612f800edef790d93 (diff)
fixed-zero-chunk-size-in-binary-vector
Diffstat (limited to 'lib/Data/Packed')
-rw-r--r--lib/Data/Packed/Vector.hs3
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
44chunks :: Int -> [Int] 44chunks :: Int -> [Int]
45chunks d = let c = d `div` chunk 45chunks 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
48putVector v = do 49putVector v = do
49 let d = dim v 50 let d = dim v