From 28b7d9fb65da6e36eff3158f77b2a023edf7f733 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Fri, 24 Mar 2006 22:12:48 +0000 Subject: Changed fortran= keywords to order= keywords --- numpy/core/numeric.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'numpy/core/numeric.py') diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 630f9ff66..e5ae12c0d 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -108,23 +108,23 @@ can_cast = multiarray.can_cast lexsort = multiarray.lexsort -def asarray(a, dtype=None, fortran=None): +def asarray(a, dtype=None, order=None): """returns a as an array. Unlike array(), no copy is performed if a is already an array. Subclasses are converted to base class ndarray. """ - return array(a, dtype, copy=False, fortran=fortran) + return array(a, dtype, copy=False, order=order) -def asanyarray(a, dtype=None, copy=False, fortran=None): +def asanyarray(a, dtype=None, copy=False, order=None): """will pass subclasses through... """ - return array(a, dtype, copy=copy, fortran=fortran, subok=1) + return array(a, dtype, copy=copy, order=order, subok=1) def ascontiguous(a, dtype=None, copy=False): - return array(a, dtype, copy=copy, fortran=False, ndmin=1) + return array(a, dtype, copy=copy, order=False, ndmin=1) def asfortran(a, dtype=None, copy=False): - return array(a, dtype, copy=copy, fortran=True, ndmin=1) + return array(a, dtype, copy=copy, order=True, ndmin=1) def isfortran(a): return a.flags.fnc @@ -362,14 +362,14 @@ def load(file): # These are all essentially abbreviations # These might wind up in a special abbreviations module -def ones(shape, dtype=int_, fortran=False): +def ones(shape, dtype=int_, order='C'): """ones(shape, dtype=int_) returns an array of the given dimensions which is initialized to all ones. """ - a = empty(shape, dtype, fortran) + a = empty(shape, dtype, order) a.fill(1) # Above is faster now after addition of fast loops. - #a = zeros(shape, dtype, fortran) + #a = zeros(shape, dtype, order) #a+=1 return a -- cgit v1.2.1