title: Distributed dask matrix from flat text file
body: <p>I'm attempting to read a flat text file (tab-delimited) representation of a matrix into a <code>dask</code> array, using <code>distributed</code> to distributed the chunks of the array across the cluster.</p>
  
  <p><em>(Aside: this is not unlike PySpark's <a href="http://spark.apache.org/docs/latest/api/python/pyspark.html#pyspark.SparkContext.textFile" rel="nofollow"><code>sc.textFile</code></a> method)</em></p>
  
  <p>However, it's not clear to me how to parse out the text file into a matrix structure using the tools available. In PySpark, I can do this with a simple <code>map</code> with a UDF that splits each line on a space and converts the tokens to a list of floats, and finally the list to an [indexed] numpy array.</p>
  
  <p>I started with the <code>dask.bag.read_text</code> method, which has a parameter <code>collection</code> that I can set to <code>False</code> so it hands me back a bunch of <code>Delayed</code> futures. <strong>How do I parse these into the rows of the final matrix?</strong></p>
  
  <pre><code>from dask.bag import read_text
  matrix = read_text(filename.txt, collection = False)
  </code></pre>
  
  <p>This returns only a single future. How can I generate a future for every line in the text file?</p>