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

numpy-svn@scip... numpy-svn@scip...
Sat Jun 21 20:15:08 CDT 2008


Author: charris
Date: 2008-06-21 20:15:05 -0500 (Sat, 21 Jun 2008)
New Revision: 5307

Modified:
   trunk/numpy/core/tests/test_ufunc.py
Log:
Small cleanup.


Modified: trunk/numpy/core/tests/test_ufunc.py
===================================================================
--- trunk/numpy/core/tests/test_ufunc.py	2008-06-21 16:20:54 UTC (rev 5306)
+++ trunk/numpy/core/tests/test_ufunc.py	2008-06-22 01:15:05 UTC (rev 5307)
@@ -6,8 +6,8 @@
         L = 6
         x = np.arange(L)
         idx = np.array(zip(np.arange(L-2), np.arange(L-2)+2)).ravel()
-        assert_array_equal(np.add.reduceat(x,idx)[::2],
-                           [1,3,5,7])
+        assert_array_equal(np.add.reduceat(x,idx)[::2], [1,3,5,7])
+
     def test_generic_loops(self) :
         """Test generic loops.
 
@@ -152,75 +152,72 @@
 
         The list of ufuncs comes from generate_umath.py and is as follows:
 
-        =====  =============  ===============  ========================
-        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)
-        =====  =============  ===============  ========================
+        =====  ====  =============  ===============  ========================
+        done   args   function        types                notes
+        =====  ====  =============  ===============  ========================
+        n      1     conjugate      nums + O
+        n      1     absolute       nums + O         complex -> real
+        n      1     negative       nums + O
+        n      1     sign           nums + O         -> int
+        n      1     invert         bool + ints + O  flts raise an error
+        n      1     degrees        real + M         cmplx raise an error
+        n      1     radians        real + M         cmplx raise an error
+        n      1     arccos         flts + M
+        n      1     arccosh        flts + M
+        n      1     arcsin         flts + M
+        n      1     arcsinh        flts + M
+        n      1     arctan         flts + M
+        n      1     arctanh        flts + M
+        n      1     cos            flts + M
+        n      1     sin            flts + M
+        n      1     tan            flts + M
+        n      1     cosh           flts + M
+        n      1     sinh           flts + M
+        n      1     tanh           flts + M
+        n      1     exp            flts + M
+        n      1     expm1          flts + M
+        n      1     log            flts + M
+        n      1     log10          flts + M
+        n      1     log1p          flts + M
+        n      1     sqrt           flts + M         real x < 0 raises error
+        n      1     ceil           real + M
+        n      1     floor          real + M
+        n      1     fabs           real + M
+        n      1     rint           flts + M
+        n      1     isnan          flts             -> bool
+        n      1     isinf          flts             -> bool
+        n      1     isfinite       flts             -> bool
+        n      1     signbit        real             -> bool
+        n      1     modf           real             -> (frac, int)
+        n      1     logical_not    bool + nums + M  -> bool
+        n      2     left_shift     ints + O         flts raise an error
+        n      2     right_shift    ints + O         flts raise an error
+        n      2     add            bool + nums + O  boolean + is ||
+        n      2     subtract       bool + nums + O  boolean - is ^
+        n      2     multiply       bool + nums + O  boolean * is &
+        n      2     divide         nums + O
+        n      2     floor_divide   nums + O
+        n      2     true_divide    nums + O         bBhH -> f, iIlLqQ -> d
+        n      2     fmod           nums + M
+        n      2     power          nums + O
+        n      2     greater        bool + nums + O  -> bool
+        n      2     greater_equal  bool + nums + O  -> bool
+        n      2     less           bool + nums + O  -> bool
+        n      2     less_equal     bool + nums + O  -> bool
+        n      2     equal          bool + nums + O  -> bool
+        n      2     not_equal      bool + nums + O  -> bool
+        n      2     logical_and    bool + nums + M  -> bool
+        n      2     logical_or     bool + nums + M  -> bool
+        n      2     logical_xor    bool + nums + M  -> bool
+        n      2     maximum        bool + nums + O
+        n      2     minimum        bool + nums + O
+        n      2     bitwise_and    bool + ints + O  flts raise an error
+        n      2     bitwise_or     bool + ints + O  flts raise an error
+        n      2     bitwise_xor    bool + ints + O  flts raise an error
+        n      2     arctan2        real + M
+        n      2     remainder      ints + real + O
+        n      2     hypot          real + M
+        =====  ====  =============  ===============  ========================
 
         Types other than those listed will be accepted, but they are cast to
         the smallest compatible type for which the function is defined. The



More information about the Numpy-svn mailing list