Skip to content

Commit 537e824

Browse files
mrshuamueller
authored andcommitted
updated based on comments
1 parent 0905269 commit 537e824

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sklearn/naive_bayes.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,10 @@ def fit(self, X, y, sample_weight=None, class_prior=None):
240240
Y *= array2d(sample_weight).T
241241

242242
if class_prior is not None:
243-
warnings.warn('class_prior is deprecated in fit function. Use it'
244-
' in __init__ instead.')
245-
self.class_prior = class_prior
243+
warnings.warn('class_prior is deprecated in fit function and will'
244+
'be removed in version 0.15. Use it in __init__ instead.')
245+
else:
246+
class_prior = self.class_prior
246247

247248
if self.class_prior:
248249
if len(self.class_prior) != n_classes:

0 commit comments

Comments
 (0)