Ignore:
Timestamp:
04/20/12 15:07:21 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
rebase_source:
95c45f80f9fe31b2d813f52272547cb87b894331
Message:

Fixed Prediction delegate's displayText method in case the 'GetBoth' value is a list instead of a tuple.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Evaluate/OWPredictions.py

    r10795 r10841  
    110110    def displayText(self, value, locale): 
    111111        pred = value.toPyObject() 
    112         if type(pred) >= tuple: 
     112        if isinstance(pred, (tuple, list)) and len(pred) == 2: 
    113113            cls, prob = pred 
    114         elif type(pred) >= orange.Value: 
     114        elif isinstance(pred, orange.Value): 
    115115            cls, prob = pred, None 
    116         elif type(pred) >= orange.Distribution: 
     116        elif isinstance(pred, orange.Distribution): 
    117117            cls, prob = pred.modus(), pred 
    118118        else: 
Note: See TracChangeset for help on using the changeset viewer.