summaryrefslogtreecommitdiff
path: root/numpy/core/memmap.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/memmap.py')
-rw-r--r--numpy/core/memmap.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/numpy/core/memmap.py b/numpy/core/memmap.py
index 72ce25b84..05bfd68b7 100644
--- a/numpy/core/memmap.py
+++ b/numpy/core/memmap.py
@@ -190,13 +190,13 @@ class memmap(ndarray):
if (mode == 'w+') and shape is None:
raise ValueError, "shape must be given"
- fid.seek(0,2)
+ fid.seek(0, 2)
flen = fid.tell()
descr = dtypedescr(dtype)
_dbytes = descr.itemsize
if shape is None:
- bytes = flen-offset
+ bytes = flen - offset
if (bytes % _dbytes):
fid.close()
raise ValueError, "Size of available data is not a "\
@@ -213,7 +213,7 @@ class memmap(ndarray):
bytes = long(offset + size*_dbytes)
if mode == 'w+' or (mode == 'r+' and flen < bytes):
- fid.seek(bytes-1,0)
+ fid.seek(bytes - 1, 0)
fid.write(chr(0))
fid.flush()
@@ -224,7 +224,6 @@ class memmap(ndarray):
else:
acc = mmap.ACCESS_WRITE
-
if sys.version_info[:2] >= (2,6):
# The offset keyword in mmap.mmap needs Python >= 2.6
bytes = bytes - offset