diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2009-04-12 23:32:31 +0000 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2009-04-12 23:32:31 +0000 |
commit | 2fbfbcf3ec688539f7dd30e0a3afafa7929b213b (patch) | |
tree | a5acba80eea302ac477d456bba5026f343df4104 /numpy/core/memmap.py | |
parent | ae58b00fee1839ba7e21ddfd7ebbf87f732caeb5 (diff) | |
download | numpy-2fbfbcf3ec688539f7dd30e0a3afafa7929b213b.tar.gz |
Small style cleanup.
Diffstat (limited to 'numpy/core/memmap.py')
-rw-r--r-- | numpy/core/memmap.py | 7 |
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 |