title: RandomForest IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
body: <p>I am working with <code>sklearn</code> on <code>RandomForestClassifier</code>:</p>
  
  <pre><code>class RandomForest(RandomForestClassifier):
  
      def fit(self, x, y):
          self.unique_train_y,  y_classes = transform_y_vectors_in_classes(y)
          return RandomForestClassifier.fit(self, x, y_classes)
  
      def predict(self, x):
          y_classes = RandomForestClassifier.predict(self, x)
          predictions = transform_classes_in_y_vectors(y_classes, self.unique_train_y)
          return predictions
  
      def transform_classes_in_y_vectors(y_classes, unique_train_y):
          cyr = [unique_train_y[predicted_index] for predicted_index in y_classes]
          predictions = np.array(float(cyr))
          return predictions
  </code></pre>
  
  <p>I got this Error message:    </p>
  
  <pre><code>IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
  </code></pre>