diff -r 2763b87dd7e8 -r 438a92342252 numpy/lib/npyio.py
--- a/numpy/lib/npyio.py	Fri Mar 25 22:37:19 2011 -0600
+++ b/numpy/lib/npyio.py	Sat Mar 26 12:23:25 2011 +0100
@@ -579,7 +579,8 @@
 
 
 def loadtxt(fname, dtype=float, comments='#', delimiter=None,
-            converters=None, skiprows=0, usecols=None, unpack=False):
+            converters=None, skiprows=0, usecols=None, unpack=False,
+            ndmin=None):
     """
     Load data from a text file.
 
@@ -616,6 +617,9 @@
     unpack : bool, optional
         If True, the returned array is transposed, so that arguments may be
         unpacked using ``x, y, z = loadtxt(...)``.  The default is False.
+    ndmin : int, optional
+        If not None, the returned array must have at least `ndmin` dimensions.
+        Legal values: 1 or 2.
 
     Returns
     -------
@@ -790,8 +794,20 @@
             fh.close()
 
     X = np.array(X, dtype)
+    X = np.squeeze(X)
 
-    X = np.squeeze(X)
+    # Verify that the array has at least dimensions `ndmin`.
+    if not (ndmin is None):
+        # Check correctness of the values of `ndmin`
+        if not (ndmin in (1, 2)):
+            msg = 'Illegal value of ndmin keyword: {0}'
+            raise ValueError(msg.format(ndmin))
+        # Tweak the size and shape of the arrays
+        if not (len(X.shape) >= ndmin):
+            if ndmin == 1:
+                X.shape = (X.size, )
+            elif ndmin == 2:
+                X.shape = (X.size, 1)
     if unpack:
         return X.T
     else:
