[Numpy-svn] r5309 - trunk/numpy/core

numpy-svn@scip... numpy-svn@scip...
Mon Jun 23 02:12:38 CDT 2008


Author: alan.mcintyre
Date: 2008-06-23 02:12:36 -0500 (Mon, 23 Jun 2008)
New Revision: 5309

Modified:
   trunk/numpy/core/records.py
Log:
Added "import numpy as N", and adjusted whitespace to allow doctests to run correctly.


Modified: trunk/numpy/core/records.py
===================================================================
--- trunk/numpy/core/records.py	2008-06-22 01:23:31 UTC (rev 5308)
+++ trunk/numpy/core/records.py	2008-06-23 07:12:36 UTC (rev 5309)
@@ -343,6 +343,7 @@
                names=None, titles=None, aligned=False, byteorder=None):
     """ create a record array from a (flat) list of arrays
 
+    >>> import numpy as N
     >>> x1=N.array([1,2,3,4])
     >>> x2=N.array(['a','dd','xyz','12'])
     >>> x3=N.array([1.1,2,3,4])
@@ -430,7 +431,7 @@
     >>> r.col1
     array([456,   2])
     >>> r.col2
-    chararray(['dbe', 'de'],
+    chararray(['dbe', 'de'], 
           dtype='|S3')
     >>> import cPickle
     >>> print cPickle.loads(cPickle.dumps(r))
@@ -510,6 +511,7 @@
     to be a file object.
 
     >>> from tempfile import TemporaryFile
+    >>> import numpy as N
     >>> a = N.empty(10,dtype='f8,i4,a5')
     >>> a[5] = (0.5,10,'abcde')
     >>>



More information about the Numpy-svn mailing list