[Numpy-svn] r6051 - in branches/visualstudio_manifest: . doc/neps numpy/distutils/command

numpy-svn@scip... numpy-svn@scip...
Sun Nov 16 07:02:17 CST 2008


Author: cdavid
Date: 2008-11-16 07:02:09 -0600 (Sun, 16 Nov 2008)
New Revision: 6051

Modified:
   branches/visualstudio_manifest/
   branches/visualstudio_manifest/doc/neps/generalized-ufuncs.rst
   branches/visualstudio_manifest/numpy/distutils/command/config.py
Log:
Merged revisions 6042-6050 via svnmerge from 
http://svn.scipy.org/svn/numpy/trunk

........
  r6043 | jarrod.millman | 2008-11-16 18:14:01 +0900 (Sun, 16 Nov 2008) | 2 lines
  
  removing some quotes
........
  r6044 | jarrod.millman | 2008-11-16 18:15:59 +0900 (Sun, 16 Nov 2008) | 2 lines
  
  adding back a few quotes
........
  r6050 | cdavid | 2008-11-16 21:30:17 +0900 (Sun, 16 Nov 2008) | 1 line
  
  Add deprecation warning for get_output and try_run: we should not use it anymore.
........



Property changes on: branches/visualstudio_manifest
___________________________________________________________________
Name: svnmerge-integrated
   - /branches/distutils-revamp:1-2752 /branches/multicore:1-3687 /trunk:1-6041
   + /branches/distutils-revamp:1-2752 /branches/multicore:1-3687 /trunk:1-6050

Modified: branches/visualstudio_manifest/doc/neps/generalized-ufuncs.rst
===================================================================
--- branches/visualstudio_manifest/doc/neps/generalized-ufuncs.rst	2008-11-16 12:30:17 UTC (rev 6050)
+++ branches/visualstudio_manifest/doc/neps/generalized-ufuncs.rst	2008-11-16 13:02:09 UTC (rev 6051)
@@ -18,18 +18,18 @@
 corresponding dimensionality of the outputs (the element-wise ufuncs
 have zero core dimensions).  The list of the core dimensions for all
 arguments is called the "signature" of a ufunc.  For example, the
-ufunc numpy.add has signature ``"(),()->()"`` defining two scalar inputs
+ufunc numpy.add has signature ``(),()->()`` defining two scalar inputs
 and one scalar output.
 
 Another example is (see the GeneralLoopingFunctions page) the function
-``inner1d(a,b)`` with a signature of ``"(i),(i)->()"``.  This applies the
+``inner1d(a,b)`` with a signature of ``(i),(i)->()``.  This applies the
 inner product along the last axis of each input, but keeps the
 remaining indices intact.  For example, where ``a`` is of shape ``(3,5,N)``
 and ``b`` is of shape ``(5,N)``, this will return an output of shape ``(3,5)``.
 The underlying elementary function is called 3*5 times.  In the
-signature, we specify one core dimension ``"(i)"`` for each input and zero core
-dimensions ``"()"`` for the output, since it takes two 1-d arrays and
-returns a scalar.  By using the same name ``"i"``, we specify that the two
+signature, we specify one core dimension ``(i)`` for each input and zero core
+dimensions ``()`` for the output, since it takes two 1-d arrays and
+returns a scalar.  By using the same name ``i``, we specify that the two
 corresponding dimensions should be of the same size (or one of them is
 of size 1 and will be broadcasted).
 
@@ -91,8 +91,8 @@
 following format:
 
 * Core dimensions of each input or output array are represented by a
-  list of dimension names in parentheses, ``"(i_1,...,i_N)"``; a scalar 
-  input/output is denoted by ``"()"``.  Instead of ``"i_1"``, ``"i_2"``,
+  list of dimension names in parentheses, ``(i_1,...,i_N)``; a scalar 
+  input/output is denoted by ``()``.  Instead of ``i_1``, ``i_2``,
   etc, one can use any valid Python variable name.
 * Dimension lists for different arguments are separated by ``","``.
   Input/output arguments are separated by ``"->"``.
@@ -123,19 +123,19 @@
 
 Here are some examples of signatures:
 
-+-------------+--------------------------+-----------------------------------+
-| add         | ``"(),()->()"``          |                                   |
-+-------------+--------------------------+-----------------------------------+
-| inner1d     | ``"(i),(i)->()"``        |                                   |
-+-------------+--------------------------+-----------------------------------+
-| sum1d       | ``"(i)->()"``            |                                   |
-+-------------+--------------------------+-----------------------------------+
-| dot2d       | ``"(m,n),(n,p)->(m,p)"`` | matrix multiplication             |
-+-------------+--------------------------+-----------------------------------+
-| outer_inner | ``"(i,t),(j,t)->(i,j)"`` | inner over the last dimension,    |
-|             |                          | outer over the second to last,    |
-|             |                          | and loop/broadcast over the rest. |
-+-------------+--------------------------+-----------------------------------+
++-------------+------------------------+-----------------------------------+
+| add         | ``(),()->()``          |                                   |
++-------------+------------------------+-----------------------------------+
+| inner1d     | ``(i),(i)->()``        |                                   |
++-------------+------------------------+-----------------------------------+
+| sum1d       | ``(i)->()``            |                                   |
++-------------+------------------------+-----------------------------------+
+| dot2d       | ``(m,n),(n,p)->(m,p)`` | matrix multiplication             |
++-------------+------------------------+-----------------------------------+
+| outer_inner | ``(i,t),(j,t)->(i,j)`` | inner over the last dimension,    |
+|             |                        | outer over the second to last,    |
+|             |                        | and loop/broadcast over the rest. |
++-------------+------------------------+-----------------------------------+
 
 C-API for implementing Elementary Functions
 -------------------------------------------
@@ -167,7 +167,7 @@
 ufuncs.  The following elements contain the strides of all core
 dimensions for all arguments in order.
 
-For example, consider a ufunc with signature ``"(i,j),(i)->()"``.  In
+For example, consider a ufunc with signature ``(i,j),(i)->()``.  In
 this case, ``args`` will contain three pointers to the data of the
 input/output arrays ``a``, ``b``, ``c``.  Furthermore, ``dimensions`` will be
 ``[N, I, J]`` to define the size of ``N`` of the loop and the sizes ``I`` and ``J``

Modified: branches/visualstudio_manifest/numpy/distutils/command/config.py
===================================================================
--- branches/visualstudio_manifest/numpy/distutils/command/config.py	2008-11-16 12:30:17 UTC (rev 6050)
+++ branches/visualstudio_manifest/numpy/distutils/command/config.py	2008-11-16 13:02:09 UTC (rev 6051)
@@ -4,6 +4,8 @@
 # Pearu Peterson
 
 import os, signal
+import warnings
+
 from distutils.command.config import config as old_config
 from distutils.command.config import LANG_EXT
 from distutils import log
@@ -22,6 +24,17 @@
         self.fcompiler = None
         old_config.initialize_options(self)
 
+    def try_run(self, body, headers=None, include_dirs=None,
+                libraries=None, library_dirs=None, lang="c"):
+        warnings.warn("\n+++++++++++++++++++++++++++++++++++++++++++++++++\n" \
+                      "Usage of try_run is deprecated: please do not \n" \
+                      "use it anymore, and avoid configuration checks \n" \
+                      "involving running executable on the target machine.\n" \
+                      "+++++++++++++++++++++++++++++++++++++++++++++++++\n",
+                      DeprecationWarning)
+        return old_config.try_run(self, body, headers, include_dirs, libraries,
+                                  library_dirs, lang)
+
     def _check_compiler (self):
         old_config._check_compiler(self)
         from numpy.distutils.fcompiler import FCompiler, new_fcompiler
@@ -215,6 +228,12 @@
         built from 'body' and 'headers'. Returns the exit status code
         of the program and its output.
         """
+        warnings.warn("\n+++++++++++++++++++++++++++++++++++++++++++++++++\n" \
+                      "Usage of get_output is deprecated: please do not \n" \
+                      "use it anymore, and avoid configuration checks \n" \
+                      "involving running executable on the target machine.\n" \
+                      "+++++++++++++++++++++++++++++++++++++++++++++++++\n",
+                      DeprecationWarning)
         from distutils.ccompiler import CompileError, LinkError
         self._check_compiler()
         exitcode, output = 255, ''



More information about the Numpy-svn mailing list