summaryrefslogtreecommitdiff
path: root/scipy/base/numeric.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2005-10-12 09:50:38 +0000
committerTravis Oliphant <oliphant@enthought.com>2005-10-12 09:50:38 +0000
commit33e2d21b6e75d11572dbadb7a8a0038cd02206eb (patch)
tree53667f81c187a409b4536e58e4ae5660f84a4c8f /scipy/base/numeric.py
parente3ba6c65315e036990a8c28fd8dd5a072c7dc635 (diff)
downloadnumpy-33e2d21b6e75d11572dbadb7a8a0038cd02206eb.tar.gz
Fixed remainder to behaved like Python.
Diffstat (limited to 'scipy/base/numeric.py')
-rw-r--r--scipy/base/numeric.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/scipy/base/numeric.py b/scipy/base/numeric.py
index d2c98c573..931a6cfff 100644
--- a/scipy/base/numeric.py
+++ b/scipy/base/numeric.py
@@ -68,8 +68,7 @@ def zeros_like(a):
use empty_like(), which is faster as it only allocates memory."""
a = asarray(a)
- return a.__array_wrap__(zeros(a.shape,a.dtype,
- a.flags['FORTRAN'] and a.ndim > 1))
+ return zeros(a.shape,a.dtype, a.flags['FNC'])
def empty_like(a):
"""Return an empty (uninitialized) array of the shape and typecode of a.
@@ -78,9 +77,8 @@ def empty_like(a):
your array to be initialized, you should use zeros_like().
"""
- asarray(a)
- return a.__array_wrap__(empty(a.shape,a.dtype,
- a.flags['FORTRAN'] and a.ndim > 1))
+ a = asarray(a)
+ return empty(a.shape,a.dtype, a.flags['FNC'])
# end Fernando's utilities