summaryrefslogtreecommitdiff
path: root/numpy/core/memmap.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-12-02 00:35:09 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-12-02 00:35:09 +0000
commit574fe369112ded91f80502db73022a8fd79d3fe3 (patch)
tree904b1b27f758c7e5d6c2790a8f5066300f5b5a15 /numpy/core/memmap.py
parent5898c2c445cb7fe14e2866b34f625e6f95bbf82f (diff)
downloadnumpy-574fe369112ded91f80502db73022a8fd79d3fe3.tar.gz
Add order keyword to argsort and fix documentation of sort and argsort. Also, fix so that a Python long is passed to mmap instead of an array scalar. Fix setting when using mixed array indices and slice objects by making sure to swap the object in the reverse direction to the swapping that takes place on the MapGet operations.
Diffstat (limited to 'numpy/core/memmap.py')
-rw-r--r--numpy/core/memmap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/memmap.py b/numpy/core/memmap.py
index 83e9de1ef..d253dabb7 100644
--- a/numpy/core/memmap.py
+++ b/numpy/core/memmap.py
@@ -17,7 +17,7 @@ mode_equivalents = {
class memmap(ndarray):
__array_priority__ = -100.0
def __new__(subtype, name, dtype=uint8, mode='r+', offset=0,
- shape=None, order=0):
+ shape=None, order='C'):
try:
mode = mode_equivalents[mode]
except KeyError:
@@ -50,7 +50,7 @@ class memmap(ndarray):
for k in shape:
size *= k
- bytes = offset + size*_dbytes
+ bytes = long(offset + size*_dbytes)
if mode == 'w+' or (mode == 'r+' and flen < bytes):
fid.seek(bytes-1,0)