diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-03-23 22:14:45 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-03-23 22:14:45 +0000 |
commit | 2db96a7f02233493849343ff9fed470cd7dc30bd (patch) | |
tree | 000a2b0c1afc209c713e2281cf77af85512c0ebe /numpy/core/numeric.py | |
parent | 3fa921bb348ca4fabfbf00973bc61be1b59c6097 (diff) | |
download | numpy-2db96a7f02233493849343ff9fed470cd7dc30bd.tar.gz |
Added ascontiguous and asfortran functions.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 1769894a5..689e5c733 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -4,7 +4,8 @@ __all__ = ['newaxis', 'ndarray', 'flatiter', 'ufunc', 'getbuffer', 'where', 'concatenate', 'fastCopyAndTranspose', 'lexsort', 'register_dtype', 'set_numeric_ops', 'can_cast', - 'asarray', 'asanyarray', 'isfortran', 'empty_like', 'zeros_like', + 'asarray', 'asanyarray', 'ascontiguous', 'asfortran', + 'isfortran', 'empty_like', 'zeros_like', 'correlate', 'convolve', 'inner', 'dot', 'outer', 'vdot', 'alterdot', 'restoredot', 'cross', 'array2string', 'get_printoptions', 'set_printoptions', @@ -119,6 +120,12 @@ def asanyarray(a, dtype=None, copy=False, fortran=None, ndmin=0): """ return array(a, dtype, copy=copy, fortran=fortran, subok=1, ndmin=ndmin) +def ascontiguous(a, dtype=None, copy=False): + return array(a, dtype, copy=copy, fortran=False, ndmin=1) + +def asfortran(a, dtype=None, copy=False): + return array(a, dtype, copy=copy, fortran=True, ndmin=1) + def isfortran(a): return a.flags.fnc |