source: orange/orange/orngBayes.py @ 8042:ffcb93bc9028

Revision 8042:ffcb93bc9028, 491 bytes checked in by markotoplak, 3 years ago (diff)

Hierarchical clustering: also catch RuntimeError when importing matplotlib (or the documentation could not be built on server).

Line 
1from Orange.classification.bayes import NaiveLearner as BayesLearner, NaiveClassifier as BayesClassifier
2from Orange.core import BayesClassifier as _BayesClassifier
3
4def printModel(bayesclassifier):
5    """
6    DEPRECATED. Replaced by :obj:`BayesClassifier.dump`.
7    """
8    if isinstance(bayesclassifier, BayesClassifier):
9        print bayesclassifier
10    elif isinstance(bayesclassifier, _BayesClassifier):
11        print BayesClassifier(bayesclassifier)
12    else:
13        raise TypeError
Note: See TracBrowser for help on using the repository browser.