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/code_generators/generate_umath.py | |
parent | e3ba6c65315e036990a8c28fd8dd5a072c7dc635 (diff) | |
download | numpy-33e2d21b6e75d11572dbadb7a8a0038cd02206eb.tar.gz |
Fixed remainder to behaved like Python.
Diffstat (limited to 'scipy/base/code_generators/generate_umath.py')
-rw-r--r-- | scipy/base/code_generators/generate_umath.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/scipy/base/code_generators/generate_umath.py b/scipy/base/code_generators/generate_umath.py index 3d4546be2..a68d3854f 100644 --- a/scipy/base/code_generators/generate_umath.py +++ b/scipy/base/code_generators/generate_umath.py @@ -73,11 +73,12 @@ defdict = { (1,1), None, "takes the conjugate of x elementwise." ], -'remainder' : [intflt,fltsO, - ("fmod,"*3, "PyNumber_Remainder"), - (2,1), Zero, - "computes x1 % x2 elementwise." - ], + +'fmod' : [intflt,fltsM, + ("fmod,"*3, "fmod"), + (2,1), Zero, + "computes (C-like) x1 % x2 elementwise." + ], 'power' : [nobool,noint, ("pow,"*6, "PyNumber_Power"), @@ -266,10 +267,12 @@ defdict = { (2,1), None, "a safe and correct arctan(x1/x2)" ], -'fmod' : [fltsM, fltsM, - ("fmod,"*3,'"fmod"'), - (2,1), None, - "computes x1-n*x2 where n is the quotient of x1 / x2"], + +'remainder' : [intflt, 'O', + ("PyObject_Remainder"), + (2,1), None, + "computes x1-n*x2 where n is floor(x1 / x2)"], + 'hypot' : [fltsM, fltsM, ("hypot,"*3, '"hypot"'), (2,1), None, |