[Numpy-svn] r5235 - trunk/numpy/core/tests

numpy-svn at scipy.org numpy-svn at scipy.org
Sun May 25 02:35:54 EDT 2008


Author: charris
Date: 2008-05-25 01:35:51 -0500 (Sun, 25 May 2008)
New Revision: 5235

Modified:
   trunk/numpy/core/tests/test_ufunc.py
Log:
Save preliminary work on testing ufuncs.


Modified: trunk/numpy/core/tests/test_ufunc.py
===================================================================
--- trunk/numpy/core/tests/test_ufunc.py	2008-05-24 23:04:06 UTC (rev 5234)
+++ trunk/numpy/core/tests/test_ufunc.py	2008-05-25 06:35:51 UTC (rev 5235)
@@ -152,71 +152,83 @@
 
         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
 




More information about the Numpy-svn mailing list