title: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables is deprecated
body: <p>I'm trying to turn a Tensorflow Dataset into a NumPy array and I'm getting a deprecation warning:</p>
  <blockquote>
  <p>FutureWarning: arrays to stack must be passed as a &quot;sequence&quot; type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.</p>
  </blockquote>
  <p>What is the &quot;new&quot; way of doing this?</p>
  <p>Reproducible example with <code>numpy 1.18.1</code> and <code>tensorflow 2.1.0</code>:</p>
  <pre><code>import tensorflow as tf
  import numpy as np
  
  ds = tf.data.Dataset.enumerate(tf.data.Dataset.range(20, 40))
  
  np.vstack(ds)
  </code></pre>
  <p>What I tried: I can only do it with one dimension at a time.</p>
  <pre><code>np.fromiter(ds.map(lambda x, y: x), float)
  </code></pre>