diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2008-05-25 06:35:51 +0000 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2008-05-25 06:35:51 +0000 |
commit | a73ef5ec3a8db5612779abe21c442bb89275ed6c (patch) | |
tree | 2d9f60de5cfd9d41d24dc30535b5e1d65978cc7f | |
parent | 4acc46e218883af4f32fd4d714abb0e8876bc146 (diff) | |
download | numpy-a73ef5ec3a8db5612779abe21c442bb89275ed6c.tar.gz |
Save preliminary work on testing ufuncs.
-rw-r--r-- | numpy/core/tests/test_ufunc.py | 140 |
1 files changed, 76 insertions, 64 deletions
diff --git a/numpy/core/tests/test_ufunc.py b/numpy/core/tests/test_ufunc.py index d60a5282d..b99c938d8 100644 --- a/numpy/core/tests/test_ufunc.py +++ b/numpy/core/tests/test_ufunc.py @@ -152,70 +152,82 @@ class TestUfunc(NumpyTestCase): The list of ufuncs comes from generate_umath.py and is as follows: - add - subtract - multiply - divide - floor_divide - true_divide - conjugate - fmod - square - reciprocal - ones_like - power - absolute - negative - sign - greater - greate_equal - less - less_equal - equal - not_equal - logical_and - logical_or - logical_xor - maximum - minimum - bitwise_and - bitwise_or - bitwise_xor - invert - left_shift - right_shift - degrees - radians - arccos - arccosh - arcsin - arcsinh - arctan - arctanh - cos - sin - tan - cosh - sinh - tanh - exp - expm1 - log - log10 - log1p - sqrt - ceil - fabs - floor - rint - arctan2 - remainder - hypot - isnan - isinf - isfinite - signbit - modf + ===== ============= =============== ======================== + done function types notes + ===== ============= =============== ======================== + n add bool + nums + O boolean + is || + n subtract bool + nums + O boolean - is ^ + n multiply bool + nums + O boolean * is & + n divide nums + O + n floor_divide nums + O + n true_divide nums + O bBhH -> f, iIlLqQ -> d + n conjugate nums + O + n fmod nums + M + n square nums + O + n reciprocal nums + O + n ones_like nums + O + n power nums + O + n absolute nums + O complex -> real + n negative nums + O + n sign nums + O -> int + n greater bool + nums + O -> bool + n greater_equal bool + nums + O -> bool + n less bool + nums + O -> bool + n less_equal bool + nums + O -> bool + n equal bool + nums + O -> bool + n not_equal bool + nums + O -> bool + n logical_and bool + nums + M -> bool + n logical_not bool + nums + M -> bool + n logical_or bool + nums + M -> bool + n logical_xor bool + nums + M -> bool + n maximum bool + nums + O + n minimum bool + nums + O + n bitwise_and bool + ints + O flts raise an error + n bitwise_or bool + ints + O flts raise an error + n bitwise_xor bool + ints + O flts raise an error + n invert bool + ints + O flts raise an error + n left_shift ints + O flts raise an error + n right_shift ints + O flts raise an error + n degrees real + M cmplx raise an error + n radians real + M cmplx raise an error + n arccos flts + M + n arccosh flts + M + n arcsin flts + M + n arcsinh flts + M + n arctan flts + M + n arctanh flts + M + n cos flts + M + n sin flts + M + n tan flts + M + n cosh flts + M + n sinh flts + M + n tanh flts + M + n exp flts + M + n expm1 flts + M + n log flts + M + n log10 flts + M + n log1p flts + M + n sqrt flts + M real x < 0 raises error + n ceil real + M + n floor real + M + n fabs real + M + n rint flts + M + n arctan2 real + M + n remainder ints + real + O + n hypot real + M + n isnan flts -> bool + n isinf flts -> bool + n isfinite flts -> bool + n signbit real -> bool + n modf real -> (frac, int) + ===== ============= =============== ======================== + + Types other than those listed will be accepted, but they are cast to + the smallest compatible type for which the function is defined. The + casting rules are: + + bool -> int8 -> float32 + ints -> double """ pass |