title: Classification Report - Precision and F-score are ill-defined
body: <p>I imported classification_report from sklearn.metrics and when I enter my <code>np.arrays</code> as parameters I get the following error :</p>
  
  <blockquote>
    <p>/usr/local/lib/python3.6/dist-packages/sklearn/metrics/classification.py:1135:
    UndefinedMetricWarning: Precision and F-score are ill-defined and
    being set to 0.0 in labels with no predicted samples.   'precision',
    'predicted', average, warn_for)
    /usr/local/lib/python3.6/dist-packages/sklearn/metrics/classification.py:1137:
    UndefinedMetricWarning: Recall and F-score are ill-defined and being
    set to 0.0 in labels with no true samples.   'recall', 'true',
    average, warn_for)</p>
  </blockquote>
  
  <p>Here is the code : </p>
  
  <pre><code>svclassifier_polynomial = SVC(kernel = 'poly', degree = 7, C = 5)
  
  svclassifier_polynomial.fit(X_train, y_train)
  y_pred = svclassifier_polynomial.predict(X_test)
  
  
  poly = classification_report(y_test, y_pred)
  </code></pre>
  
  <p>When I was not using np.array in the past it worked just fine, any ideas on how i can correct this ? </p>