summaryrefslogtreecommitdiff
path: root/numpy/lib
diff options
context:
space:
mode:
authorLuke Carmichael <luke@deepfield.net>2013-11-08 20:02:15 -0500
committerLuke Carmichael <luke@deepfield.net>2013-11-08 20:02:15 -0500
commit83eb3ac0658d5e71d9860f8b1e37f285ec19c692 (patch)
treec263183d01c09de3aed986f0252ec502c43cf3d8 /numpy/lib
parenta7a30016a946beef8e2c5a1860222dfbc2a60a18 (diff)
downloadnumpy-83eb3ac0658d5e71d9860f8b1e37f285ec19c692.tar.gz
BUG: Fix chunked reading of strings longer than BUFFERSIZE
This fix correctly calculates the number of BUFFER_SIZE chunks to read. This fix takes into account dtype sizes that could be larger than the BUFFER_SIZE, like a long string. See #4027
Diffstat (limited to 'numpy/lib')
-rw-r--r--numpy/lib/tests/test_format.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_format.py b/numpy/lib/tests/test_format.py
index 1dea316bc..485947764 100644
--- a/numpy/lib/tests/test_format.py
+++ b/numpy/lib/tests/test_format.py
@@ -429,7 +429,7 @@ def test_roundtrip():
yield assert_array_equal, arr, arr2
def test_long_str():
- long_str_arr = np.empty(10, dtype='S279291')
+ long_str_arr = np.ones(1, dtype=np.dtype((str, format.BUFFER_SIZE+1)))
long_str_arr2 = roundtrip(long_str_arr)
@dec.slow