diff options
author | Travis Oliphant <oliphant@enthought.com> | 2005-10-12 09:50:38 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2005-10-12 09:50:38 +0000 |
commit | 33e2d21b6e75d11572dbadb7a8a0038cd02206eb (patch) | |
tree | 53667f81c187a409b4536e58e4ae5660f84a4c8f /scipy/base/ufunclike.py | |
parent | e3ba6c65315e036990a8c28fd8dd5a072c7dc635 (diff) | |
download | numpy-33e2d21b6e75d11572dbadb7a8a0038cd02206eb.tar.gz |
Fixed remainder to behaved like Python.
Diffstat (limited to 'scipy/base/ufunclike.py')
-rw-r--r-- | scipy/base/ufunclike.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/scipy/base/ufunclike.py b/scipy/base/ufunclike.py index a64d01a3f..8ef479057 100644 --- a/scipy/base/ufunclike.py +++ b/scipy/base/ufunclike.py @@ -3,7 +3,7 @@ import numeric as _nx from numeric import asarray, empty, empty_like, isinf, signbit import umath -__all__ = ['fix','mod','isneginf','isposinf','sign'] +__all__ = ['fix','isneginf','isposinf','sign'] def fix(x, y=None): """ Round x to nearest integer towards zero. @@ -16,19 +16,6 @@ def fix(x, y=None): y[x<0] = y[x<0]+1 return y -def mod(x,y,z=None): - """ x - y*floor(x/y) - - For numeric arrays, x % y has the same sign as x while - mod(x,y) has the same sign as y. - """ - x = asarray(x) - y = asarray(y) - if z is None: - z = empty_like(x) - tmp = _nx.floor(x*1.0/y) - return _nx.subtract(x, y*tmp, z) - def isposinf(x, y=None): if y is None: y = empty(x.shape, dtype='?') |