summaryrefslogtreecommitdiff
path: root/numpy/core/oldnumeric.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-03-21 05:21:43 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-03-21 05:21:43 +0000
commitcdbcee59fbe407dcfa3a81fc18f95eca4e8ec6c4 (patch)
treeeb824394b6eeb3f6f02cebc63ad17a36828c2dae /numpy/core/oldnumeric.py
parentcd5f36dc87fd462bc0391a3f7e13036bf1ad3c40 (diff)
downloadnumpy-cdbcee59fbe407dcfa3a81fc18f95eca4e8ec6c4.tar.gz
Fix reshape to always interpret as C-contiguous unless fortran=True is given or fortran=None and array is already fortran array.
Diffstat (limited to 'numpy/core/oldnumeric.py')
-rw-r--r--numpy/core/oldnumeric.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/oldnumeric.py b/numpy/core/oldnumeric.py
index 4531a1056..7778b7c10 100644
--- a/numpy/core/oldnumeric.py
+++ b/numpy/core/oldnumeric.py
@@ -177,13 +177,13 @@ def take(a, indices, axis=0):
result = _wrapit(a, 'take', indices, axis)
return result
-def reshape(a, newshape):
+def reshape(a, newshape, fortran=False):
"""Change the shape of a to newshape. Return a new view object.
"""
try:
- result = a.reshape(newshape)
+ result = a.reshape(newshape, fortran=fortran)
except AttributeError:
- result = _wrapit(a, 'reshape', newshape)
+ result = _wrapit(a, 'reshape', newshape, fortran=fortran)
return result
def choose(a, choices):