summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-03-28 23:56:50 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-03-28 23:56:50 +0000
commitf819562be99e8f0adde23264d3aab654c0d32071 (patch)
treedba83af2d7ad994e73ab383e2f15a7fa867e03a8 /numpy/core/numeric.py
parentffe633bdf4ca09b5ad084998c441dc1d109d2fcc (diff)
downloadnumpy-f819562be99e8f0adde23264d3aab654c0d32071.tar.gz
Updates to array creation: improve docstring, allow fast exit for subok=1, remove copy argument from all but array function itself.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index e5ae12c0d..8bab9008b 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -4,7 +4,7 @@ __all__ = ['newaxis', 'ndarray', 'flatiter', 'ufunc',
'getbuffer',
'where', 'concatenate', 'fastCopyAndTranspose', 'lexsort',
'register_dtype', 'set_numeric_ops', 'can_cast',
- 'asarray', 'asanyarray', 'ascontiguous', 'asfortran',
+ 'asarray', 'asanyarray', 'ascontiguousarray', 'asfortranarray',
'isfortran', 'empty_like', 'zeros_like',
'correlate', 'convolve', 'inner', 'dot', 'outer', 'vdot',
'alterdot', 'restoredot', 'cross',
@@ -115,16 +115,16 @@ def asarray(a, dtype=None, order=None):
"""
return array(a, dtype, copy=False, order=order)
-def asanyarray(a, dtype=None, copy=False, order=None):
+def asanyarray(a, dtype=None, order=None):
"""will pass subclasses through...
"""
- return array(a, dtype, copy=copy, order=order, subok=1)
+ return array(a, dtype, copy=False, order=order, subok=1)
-def ascontiguous(a, dtype=None, copy=False):
- return array(a, dtype, copy=copy, order=False, ndmin=1)
+def ascontiguousarray(a, dtype=None):
+ return array(a, dtype, copy=False, order='C', ndmin=1)
-def asfortran(a, dtype=None, copy=False):
- return array(a, dtype, copy=copy, order=True, ndmin=1)
+def asfortranarray(a, dtype=None):
+ return array(a, dtype, copy=False, order='F', ndmin=1)
def isfortran(a):
return a.flags.fnc