title: AxisError: axis 1 is out of bounds for array of dimension 1 when calculating accuracy of classes
body: <p>I try to predict 10 classes using this code</p>
  <pre><code>#Predicting the Test set rules
  y_pred = model.predict(traindata)
  y_pred = np.argmax(y_pred, axis=1) 
  y_true = np.argmax(testdata, axis=1) 
  
  target_names = [&quot;akLembut&quot;,&quot;akMundur&quot;,&quot;akTajam&quot;,&quot;caMenaik&quot;, &quot;caMenurun&quot;, &quot;coretanTengah&quot;, &quot;garisAtas&quot;, &quot;garisBawah&quot;, &quot;garisBawahBanyak&quot;, &quot;ttdCangkang&quot;]
  print(&quot;\n&quot;+ classification_report(y_true, y_pred, target_names=target_names))
  </code></pre>
  <p>But then I got an error message like this</p>
  <pre><code>AxisError                                 Traceback (most recent call last)
  &lt;ipython-input-13-a2b02b251547&gt; in &lt;module&gt;()
        2 y_pred = model.predict(traindata)
        3 y_pred = np.argmax(y_pred, axis=1)
  ----&gt; 4 y_true = np.argmax(testdata, axis=1)
        5 
        6 target_names = [&quot;akLembut&quot;,&quot;akMundur&quot;,&quot;akTajam&quot;,&quot;caMenaik&quot;, &quot;caMenurun&quot;, &quot;coretanTengah&quot;, &quot;garisAtas&quot;, &quot;garisBawah&quot;, &quot;garisBawahBanyak&quot;, &quot;ttdCangkang&quot;]
  
  &lt;__array_function__ internals&gt; in argmax(*args, **kwargs)
  
  2 frames
  /usr/local/lib/python3.6/dist-packages/numpy/core/fromnumeric.py in _wrapit(obj, method, *args, **kwds)
       45     except AttributeError:
       46         wrap = None
  ---&gt; 47     result = getattr(asarray(obj), method)(*args, **kwds)
       48     if wrap:
       49         if not isinstance(result, mu.ndarray):
  
  AxisError: axis 1 is out of bounds for array of dimension 1
  </code></pre>
  <p>I already train the data and I need to know each accuracy.</p>