def load(fname,comments='#',delimiter=None, converters=None,skiprows=0,
         usecols=None, unpack=False, dtype=np.float_):
    """
    Load ASCII data from *fname* into an array and return the array.

    Deprecated: use numpy.loadtxt.

    The data must be regular, same number of values in every row

    *fname* can be a filename or a file handle.  Support for gzipped
    files is automatic, if the filename ends in '.gz'.

    matfile data is not supported; for that, use :mod:`scipy.io.mio`
    module.

    Example usage::

      X = load('test.dat')  # data in two columns
      t = X[:,0]
      y = X[:,1]

    Alternatively, you can do the same with "unpack"; see below::

      X = load('test.dat')    # a matrix of data
      x = load('test.dat')    # a single column of data

    - *comments*: the character used to indicate the start of a comment
      in the file

    - *delimiter* is a string-like character used to seperate values
      in the file. If *delimiter* is unspecified or *None*, any
      whitespace string is a separator.

    - *converters*, if not *None*, is a dictionary mapping column number to
      a function that will convert that column to a float (or the optional
      *dtype* if specified).  Eg, if column 0 is a date string::

        converters = {0:datestr2num}

    - *skiprows* is the number of rows from the top to skip.

    - *usecols*, if not *None*, is a sequence of integer column indexes to
      extract where 0 is the first column, eg ``usecols=[1,4,5]`` to extract
      just the 2nd, 5th and 6th columns

    - *unpack*, if *True*, will transpose the matrix allowing you to unpack
      into named arguments on the left hand side::

        t,y = load('test.dat', unpack=True) # for  two column data
        x,y,z = load('somefile.dat', usecols=[3,5,7], unpack=True)

    - *dtype*: the array will have this dtype.  default: ``numpy.float_``

    .. seealso::

        See :file:`examples/pylab_examples/load_converter.py` in the source tree
           Exercises many of these options.
    """

    warnings.warn("use numpy.loadtxt", DeprecationWarning)  # 2009/06/13

    if converters is None: converters = {}
    fh = cbook.to_filehandle(fname)
    X = []

    if delimiter==' ':
        # space splitting is a special case since x.split() is what
        # you want, not x.split(' ')
        def splitfunc(x):
            return x.split()
    else:
        def splitfunc(x):
            return x.split(delimiter)

    converterseq = None
    for i,line in enumerate(fh):
        if i<skiprows: continue
        line = line.split(comments, 1)[0].strip()
        if not len(line): continue
        if converterseq is None:
            converterseq = [converters.get(j,float)
                               for j,val in enumerate(splitfunc(line))]
        if usecols is not None:
            vals = splitfunc(line)
            row = [converterseq[j](vals[j]) for j in usecols]
        else:
            row = [converterseq[j](val)
                      for j,val in enumerate(splitfunc(line))]
        thisLen = len(row)
        X.append(row)

    X = np.array(X, dtype)
    r,c = X.shape
    if r==1 or c==1:
        X.shape = max(r,c),
    if unpack: return X.transpose()
    else: return X