title: ValueError: Number of priors must match number of classes
body: <p>I want to compile my python3 code on ubuntu, and also want to know about the problem, such that i can handle that in future.</p>
  
  <p>It seems there is some problem with the imported library function.</p>
  
  <pre><code>## sample code
  1  import numpy as np
  2  x = np.array([[-1,-1],[-2,-1],[-3,-2],[1,1],[2,1],[3,2]])
  3  y = np.array([1,1,1,2,2,2])
  4  from sklearn.naive_bayes import GaussianNB
  5  clf = GaussianNB(x, y)
  6  clf = clf.fit(x,y) ###showing error on compiling
  7  print(clf.predict([[-2,1]]))
  
  
  
  ## output shown
  
  Traceback (most recent call last):
    File "naive.py", line 7, in &lt;module&gt;
      clf = clf.fit(x,y)
    File "/home/abhihsek/.local/lib/python3.6/site- 
     packages/sklearn/naive_bayes.py", line 192, in fit
      sample_weight=sample_weight)
    File "/home/abhihsek/.local/lib/python3.6/site- 
  packages/sklearn/naive_bayes.py", line 371, in _partial_fit
      raise ValueError('Number of priors must match number of'
  ValueError: Number of priors must match number of classes.
  
  
  
  ## code of library function  line 192
  190  X, y = check_X_y(X, y)
  191          return self._partial_fit(X, y, np.unique(y), 
  _refit=True,
  192  
  
                                   sample_weight=sample_weight)
  
  ## code of library function   line 371
  369  # Check that the provide prior match the number of classes
  370                  if len(priors) != n_classes:
  371                      raise ValueError('Number of priors must 
  match 
    number of'
  372                                       ' classes.')
  373                # Check that the sum is 1
  </code></pre>