title: problem in indices of y for the command train_test_split (problem with setting stratify)
body: <p>In order to divide to train test data :</p>
  
  <pre><code>X_train, X_test, y_train, y_test = train_test_split(X, y.iloc[:,1], test_size=0.3,random_state=seed, stratify=y)
  </code></pre>
  
  <p>but when I run I saw this error:(I have written the size of x and y)</p>
  
  <blockquote>
  <pre><code>Traceback (most recent call last):
    ...
     , in &lt;module&gt;
     X_train, X_test, y_train, y_test = train_test_split(X, y.iloc[:,1], test_size=0.3,random_state=seed, stratify=y)
      AttributeError: 'numpy.ndarray' object has no attribute 'iloc'
  </code></pre>
  </blockquote>
  
  <hr>
  
  <p><strong>EDIT</strong>:
  The shapes are: </p>
  
  <pre><code>Shape(X)= (284807, 28)
  Shape(y)= (284807,)
  </code></pre>
  
  <p>Then I used:</p>
  
  <pre><code>X_train, X_test, y_train, y_test = train_test_split(X, y[:,1], test_size=0.3,random_state=seed, stratify=y)
  </code></pre>
  
  <p>But I saw:</p>
  
  <blockquote>
    <p>IndexError: too many indices for array</p>
  </blockquote>
  
  <p>How to solve this problem?</p>