[Scipy-svn] r3386 - in trunk: . scipy/io/examples

scipy-svn@scip... scipy-svn@scip...
Tue Oct 2 01:38:58 CDT 2007


Author: jarrod.millman
Date: 2007-10-02 01:38:43 -0500 (Tue, 02 Oct 2007)
New Revision: 3386

Modified:
   trunk/TOCHANGE.txt
   trunk/scipy/io/examples/read_array_demo1.py
Log:
rest typo


Modified: trunk/TOCHANGE.txt
===================================================================
--- trunk/TOCHANGE.txt	2007-10-02 06:36:43 UTC (rev 3385)
+++ trunk/TOCHANGE.txt	2007-10-02 06:38:43 UTC (rev 3386)
@@ -40,6 +40,7 @@
 -------------
 
 See http://projects.scipy.org/scipy/numpy/wiki/CodingStyleGuidelines
+
 * use new docstring format
 
 

Modified: trunk/scipy/io/examples/read_array_demo1.py
===================================================================
--- trunk/scipy/io/examples/read_array_demo1.py	2007-10-02 06:36:43 UTC (rev 3385)
+++ trunk/scipy/io/examples/read_array_demo1.py	2007-10-02 06:38:43 UTC (rev 3386)
@@ -1,58 +1,58 @@
-#=========================================================================
-# NAME: read_array_demo1
-#
-# DESCRIPTION: Examples to read 2 columns from a multicolumn ascii text 
-# file, skipping the first line of header. First example reads into 
-# 2 separate arrays. Second example reads into a single array. Data are
-# then plotted.
-#
-# Here is the format of the file test.txt:
-# --------
-# Some header to skip
-# 1 2 3
-# 2 4 6
-# 3 6 9
-# 4 8 12
-#
-# USAGE:
-# python read_array_demo1.py
-#       
-# PARAMETERS:
-#
-# DEPENDENCIES:
-# matplotlib (pylab)
-# test.txt
-#
-#
-# AUTHOR: Simon J. Hook
-# DATE  : 09/23/2005
-#
-# MODIFICATION HISTORY:
-#
-# COMMENT:
-#
-#============================================================================
-
-from scipy import *
-from scipy.io import read_array
-from pylab import *
-
-def main():
-
-    # First example, read first and second column from ascii file. Skip first
-    # line of header.
-    # Note use of (1,-1) in lines to skip first line and then read to end of file
-    # Note use of (0,) in columns to pick first column, since its a tuple need trailing comma
-    x=read_array("test.txt",lines=(1,-1), columns=(0,))
-    y=read_array("test.txt",lines=(1,-1), columns=(1,))
-
-    #Second example, read the file into a single arry
-    z=read_array("test.txt",lines=(1,-1), columns=(0,2))
-    
-    # Plot the data
-    plot(x,y,'r--',z[:,0],z[:,1])
-    show()
-
-# The one and only main function
-if __name__ == "__main__":
+#=========================================================================
+# NAME: read_array_demo1
+#
+# DESCRIPTION: Examples to read 2 columns from a multicolumn ascii text 
+# file, skipping the first line of header. First example reads into 
+# 2 separate arrays. Second example reads into a single array. Data are
+# then plotted.
+#
+# Here is the format of the file test.txt:
+# --------
+# Some header to skip
+# 1 2 3
+# 2 4 6
+# 3 6 9
+# 4 8 12
+#
+# USAGE:
+# python read_array_demo1.py
+#       
+# PARAMETERS:
+#
+# DEPENDENCIES:
+# matplotlib (pylab)
+# test.txt
+#
+#
+# AUTHOR: Simon J. Hook
+# DATE  : 09/23/2005
+#
+# MODIFICATION HISTORY:
+#
+# COMMENT:
+#
+#============================================================================
+
+from scipy import *
+from scipy.io import read_array
+from pylab import *
+
+def main():
+
+    # First example, read first and second column from ascii file. Skip first
+    # line of header.
+    # Note use of (1,-1) in lines to skip first line and then read to end of file
+    # Note use of (0,) in columns to pick first column, since its a tuple need trailing comma
+    x=read_array("test.txt",lines=(1,-1), columns=(0,))
+    y=read_array("test.txt",lines=(1,-1), columns=(1,))
+
+    #Second example, read the file into a single arry
+    z=read_array("test.txt",lines=(1,-1), columns=(0,2))
+    
+    # Plot the data
+    plot(x,y,'r--',z[:,0],z[:,1])
+    show()
+
+# The one and only main function
+if __name__ == "__main__":
     main()



More information about the Scipy-svn mailing list