Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

force larger output dtype to avoid overflow on 32 bit #56

Merged
merged 1 commit into from
Sep 25, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
force larger output dtype to avoid overflow on 32 bit
  • Loading branch information
esc committed Sep 18, 2014
commit 23fad32b7c01c90259cb3232785c8618c46624f9
3 changes: 2 additions & 1 deletion bcolz/tests/test_ctable.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,8 @@ def test02(self):
l, s = 0, 0.
for block in bcolz.iterblocks(t, blen, blen - 1):
l += len(block)
s += block['f1'].sum()
# f8 is to small to hold the sum on 32 bit
s += block['f1'].sum(dtype='f16')
self.assertEqual(l, (N - (blen - 1)))
self.assertEqual(s, (np.arange(blen - 1, N, dtype='f8') * 2).sum())

Expand Down