diff options
Diffstat (limited to 'numpy/core/memmap.py')
-rw-r--r-- | numpy/core/memmap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/memmap.py b/numpy/core/memmap.py index 9ba4817f4..062645551 100644 --- a/numpy/core/memmap.py +++ b/numpy/core/memmap.py @@ -246,7 +246,7 @@ class memmap(ndarray): bytes = long(offset + size*_dbytes) - if mode == 'w+' or (mode == 'r+' and flen < bytes): + if mode in ('w+', 'r+') and flen < bytes: fid.seek(bytes - 1, 0) fid.write(b'\0') fid.flush() |