summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-10-24 07:26:55 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-10-24 07:26:55 +0000
commitef8c2a7e22edf179beda65d13c3a35ffc3e90c2a (patch)
tree835a18a74a9b78a0965c94cb93e0722482899fdc /numpy/core/numeric.py
parent3f4f58619f955e0af1e9c1d73bd1639b6c95e455 (diff)
downloadnumpy-ef8c2a7e22edf179beda65d13c3a35ffc3e90c2a.tar.gz
Fix some typos and allow use of F_CONTIGUOUS and C_CONTIGUOUS in requires.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index 84329edbc..632a6f28c 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -159,13 +159,17 @@ def require(a, dtype=None, requirements=None):
subok = 0
else:
subok = 1
-
+
arr = array(a, dtype=dtype, copy=False, subok=subok)
copychar = 'A'
- if 'FORTRAN' in requirements or 'F' in requirements:
+ if 'FORTRAN' in requirements or \
+ 'F_CONTIGUOUS' in requirements or \
+ 'F' in requirements:
copychar = 'F'
- elif 'CONTIGUOUS' in requirements or 'C' in requirements:
+ elif 'CONTIGUOUS' in requirements or \
+ 'C_CONTIGUOUS' in requirements or \
+ 'C' in requirements:
copychar = 'C'
for prop in requirements:
@@ -175,7 +179,7 @@ def require(a, dtype=None, requirements=None):
return arr
def isfortran(a):
- """Returns True if 'a' is laid out in Fortran-order in memory (and a.ndim > 1)
+ """Returns True if 'a' is arranged in Fortran-order in memory with a.ndim > 1
"""
return a.flags.fnc