[Numpy-svn] r3666 - trunk/numpy/doc/swig

numpy-svn at scipy.org numpy-svn at scipy.org
Wed Apr 4 16:07:11 EDT 2007


Author: wfspotz at sandia.gov
Date: 2007-04-04 15:07:06 -0500 (Wed, 04 Apr 2007)
New Revision: 3666

Modified:
   trunk/numpy/doc/swig/README
Log:
Updated documentation in README file

Modified: trunk/numpy/doc/swig/README
===================================================================
--- trunk/numpy/doc/swig/README	2007-04-04 19:57:37 UTC (rev 3665)
+++ trunk/numpy/doc/swig/README	2007-04-04 20:07:06 UTC (rev 3666)
@@ -11,40 +11,46 @@
 describing the tests, as they are a good example of what we are trying
 to do with numpy.i.  The files related to testing are::
 
-    series.h
-    series.cxx
-    Series.i
+    Vector.h
+    Vector.cxx
+    Vector.i
     test1D.py
+
+    Matrix.h
+    Matrix.cxx
+    Matrix.i
     test2D.py
 
-The series.h header file contains prototypes for functions that
-illustrate the wrapping issues we wish to address.  Right now, this
-consists of functions with argument signatures of the form::
+The header files contain prototypes for functions that illustrate the
+wrapping issues we wish to address.  Right now, this consists of
+functions with argument signatures of the following forms.  Vector.h::
 
     (type IN_ARRAY1[ANY])
     (type* IN_ARRAY1, int DIM1)
     (int DIM1, type* IN_ARRAY1)
 
+    (type INPLACE_ARRAY1[ANY])
+    (type* INPLACE_ARRAY1, int DIM1)
+    (int DIM1, type* INPLACE_ARRAY1)
+
+    (type ARGOUT_ARRAY1[ANY])
+    (type* ARGOUT_ARRAY1, int DIM1)
+    (int DIM1, type* ARGOUT_ARRAY1)
+
+Matrix.h::
+
     (type IN_ARRAY2[ANY][ANY])
     (type* IN_ARRAY2, int DIM1, int DIM2)
     (int DIM1, int DIM2, type* IN_ARRAY2)
 
-    (type INPLACE_ARRAY1[ANY])
-    (type* INPLACE_ARRAY1, int DIM1)
-    (int DIM1, type* INPLACE_ARRAY1)
-
     (type INPLACE_ARRAY2[ANY][ANY])
     (type* INPLACE_ARRAY2, int DIM1, int DIM2)
     (int DIM1, int DIM2, type* INPLACE_ARRAY2)
 
-    (type ARGOUT_ARRAY1[ANY])
-    (type* ARGOUT_ARRAY1, int DIM1)
-    (int DIM1, type* ARGOUT_ARRAY1)
-
     (type ARGOUT_ARRAY2[ANY][ANY])
 
-which take a pointer to an array of type "type", whose length is
-specified by the integer(s) DIM1 (and DIM2).
+These function signatures take a pointer to an array of type "type",
+whose length is specified by the integer(s) DIM1 (and DIM2).
 
 The objective for the IN_ARRAY signatures is for SWIG to generate
 python wrappers that take a container that constitutes a valid
@@ -58,28 +64,29 @@
 python wrappers that accept a numpy array of any of the above-listed
 types.
 
-The source file series.cxx contains the actual implementations of the
-functions described in series.h.  The python scripts test1D.py and
-test2D.py test the resulting python wrappers using the unittest
-module.
+The source files Vector.cxx and Matrix.cxx contain the actual
+implementations of the functions described in Vector.h and Matrix.h.
+The python scripts test1D.py and test2D.py test the resulting python
+wrappers using the unittest module.
 
-The SWIG interface file Series.i is used to generate the wrapper code.
-The SWIG_FILE_WITH_INIT macro allows numpy.i to be used with multiple
-python modules.  If it is specified, then the %init block found in
-Series.i is required.  The other things done in Series.i are the
-inclusion of the series.h and numpy.i files, and the "%apply"
-directives to force the functions to use the typemaps.
+The SWIG interface files Vector.i and Matrix.i are used to generate
+the wrapper code.  The SWIG_FILE_WITH_INIT macro allows numpy.i to be
+used with multiple python modules.  If it is specified, then the %init
+block found in Vector.i and Matrix.i are required.  The other things
+done in Vector.i and Matrix.i are the inclusion of the appropriate
+header file and numpy.i file, and the "%apply" directives to force the
+functions to use the typemaps.
 
 The setup.py script is a standard python distutils script.  It defines
-a _Series extension module and a Series python module.  The Makefile
-automates everything, setting up the dependencies, calling swig to
-generate the wrappers, and calling setup.py to compile the wrapper
-code and generate the shared object.  Targets "all" (default), "doc"
-and "clean" are supported.  The "doc" target creates HTML
-documentation (with make target "html"), and PDF documentation (with
-make targets "tex" and "pdf").
+_Vector and _Matrix extension modules and Vector and Matrix python
+modules.  The Makefile automates everything, setting up the
+dependencies, calling swig to generate the wrappers, and calling
+setup.py to compile the wrapper code and generate the shared objects.
+Targets "all" (default), "test", "doc" and "clean" are supported.  The
+"doc" target creates HTML documentation (with make target "html"), and
+PDF documentation (with make targets "tex" and "pdf").
 
-To build and test the code, simply execute from the shell::
+To build and run the test code, simply execute from the shell::
 
     $ make
     $ make test




More information about the Numpy-svn mailing list