title: tensorflow: ValueError: setting an array element with a sequence
body: <p>I am playing with the fixed code from <a href="https://stackoverflow.com/questions/34311893/how-can-i-train-a-simple-non-linear-regression-model-with-tensor-flow">this question</a>. I am getting the above error. Googling suggests it might be some kind of dimension mismatch, though my diagnostics does not show any:</p>
  
  <pre><code>with tf.Session() as sess:
      sess.run(init)
  
      # Fit all training data
      for epoch in range(training_epochs):
          for (_x_, _y_) in getb(train_X, train_Y):
              print("y data raw", _y_.shape )
              _y_ = tf.reshape(_y_, [-1, 1])
              print( "y data ", _y_.get_shape().as_list())
              print("y place holder", yy.get_shape().as_list())
  
              print("x data", _x_.shape )            
              print("x place holder", xx.get_shape().as_list() )
  
              sess.run(optimizer, feed_dict={xx: _x_, yy: _y_})
  </code></pre>
  
  <p>Looking at the dimensions, everything is alright: </p>
  
  <pre><code>y data raw (20,)
  y data  [20, 1]
  y place holder [20, 1]
  
  x data (20, 10)
  x place holder [20, 10]
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-131-00e0bdc140b2&gt; in &lt;module&gt;()
       16             print("x place holder", xx.get_shape().as_list() )
       17 
  ---&gt; 18             sess.run(optimizer, feed_dict={xx: _x_, yy: _y_})
       19 
       20 #         # Display logs per epoch step
  
  /usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py in run(self, fetches, feed_dict)
      355             e.args = (e.message,)
      356             raise e
  --&gt; 357           np_val = np.array(subfeed_val, dtype=subfeed_t.dtype.as_numpy_dtype)
      358           if subfeed_t.op.type == 'Placeholder':
      359             if not subfeed_t.get_shape().is_compatible_with(np_val.shape):
  
  ValueError: setting an array element with a sequence.
  </code></pre>
  
  <p>Any debugging tips?</p>