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

Commit

Permalink
test for new int64 type in CSVIter (#11499)
Browse files Browse the repository at this point in the history
  • Loading branch information
haojin2 authored and szha committed Jun 29, 2018
1 parent 3a62200 commit ebfc16e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/python/unittest/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ def check_CSVIter_synthetic(dtype='float32'):
entry_str = '1'
if dtype is 'int32':
entry_str = '200000001'
if dtype is 'int64':
entry_str = '2147483648'
with open(data_path, 'w') as fout:
for i in range(1000):
fout.write(','.join([entry_str for _ in range(8*8)]) + '\n')
Expand All @@ -332,7 +334,7 @@ def check_CSVIter_synthetic(dtype='float32'):
assert_almost_equal(data_batch.asnumpy(), expected.asnumpy())
assert data_batch.asnumpy().dtype == expected.asnumpy().dtype

for dtype in ['int32', 'float32']:
for dtype in ['int32', 'int64', 'float32']:
check_CSVIter_synthetic(dtype=dtype)

@unittest.skip("Flaky test: https://github.com/apache/incubator-mxnet/issues/11359")
Expand Down

0 comments on commit ebfc16e

Please sign in to comment.