title: Error: TypeError: only integer scalar arrays can be converted to a scalar index
body: <p>I am pretty new to python/numpy and is not completely aware of it.</p>
  
  <p>I have been trying to implement an algorithm and getting stuck at a certain point where when trying to take the dot product of an array with its transpose. The error that I am getting is this </p>
  
  <p>TypeError: only integer scalar arrays can be converted to a scalar index.</p>
  
  <p>Below is my code for reference.</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  
  dataset=pd.read_csv('SCLC_study_output_filtered_2.csv',header=0,delimiter=",")
  
  #forming the first class
  class_1 = dataset.iloc[0:20,1:20].values
  
  #forming the second class
  class_2 = dataset.iloc[20:41,1:20].values
  
  mean_c1 = np.mean(class_1, axis=0)
  
  #Taking mean of class 2 
  mean_c2 = np.mean(class_2, axis=0)
  
  mean_classes =[mean_c1,mean_c2]
  
  #Calculating S-within for class-1
  scatter_within_c1 = np.zeros((19,19))
  for i in range(0,20):
      for col in class_1:
          col, m = col.reshape(19,1), mean_c1.reshape(19,1)
          sub = np.subtract(col,m)
          scatter_within_c1 += np.prod(sub,np.transpose(sub))
  </code></pre>