Ignore:
Files:
2 added
2 deleted
27 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Data/OWDataTable.py

    r9671 r10601  
    4040        self.dist = dist 
    4141        self.attributes = list(self.examples.domain.attributes) 
    42         self.classVar = self.examples.domain.classVar 
     42        self.class_var = self.examples.domain.classVar 
    4343        self.metas = self.examples.domain.getmetas().values() 
    44         self.all_attrs = self.attributes + ([self.classVar] if self.classVar else []) + self.metas 
    45         self.clsColor = QColor(160,160,160) 
    46         self.metaColor = QColor(220,220,200) 
     44        self.all_attrs = self.attributes + ([self.class_var] if self.class_var else []) + self.metas 
     45        self.cls_color = QColor(160,160,160) 
     46        self.meta_color = QColor(220,220,200) 
    4747        self.sorted_map = range(len(self.examples)) 
    4848         
    49         self.attrLabels = sorted(reduce(set.union, [attr.attributes for attr in self.all_attrs], set())) 
     49        self.attr_labels = sorted(reduce(set.union, [attr.attributes for attr in self.all_attrs], set())) 
     50        self._show_attr_labels = False 
    5051        self._other_data = {} 
    5152         
    52     showAttrLabels = pyqtProperty("bool",  
    53                                   fget=lambda self: getattr(self, "_showAttrLabels", False), 
    54                                   fset=lambda self, val: (self.emit(SIGNAL("layoutAboutToBeChanged()")), 
    55                                                           setattr(self, "_showAttrLabels", val), 
    56                                                           self.emit(SIGNAL("headerDataChanged(Qt::Orientation, int, int)"), Qt.Horizontal, 0, len(self.all_attrs)-1), 
    57                                                           self.emit(SIGNAL("layoutChanged()")), 
    58                                                           self.emit(SIGNAL("dataChanged(QModelIndex, QModelIndex)"), self.index(0,0), 
    59                                                                     self.index(len(self.examples) - 1, len(self.all_attrs) - 1)) 
    60                                                           ) or None 
    61                                   ) 
     53    def get_show_attr_labels(self): 
     54        return self._show_attr_labels 
     55     
     56    def set_show_attr_labels(self, val): 
     57        self.emit(SIGNAL("layoutAboutToBeChanged()")) 
     58        self._show_attr_labels = val 
     59        self.emit(SIGNAL("headerDataChanged(Qt::Orientation, int, int)"), 
     60                  Qt.Horizontal,  
     61                  0,  
     62                  len(self.all_attrs) - 1 
     63                  ) 
     64        self.emit(SIGNAL("layoutChanged()")) 
     65        self.emit(SIGNAL("dataChanged(QModelIndex, QModelIndex)"),  
     66                  self.index(0,0), 
     67                  self.index(len(self.examples) - 1, len(self.all_attrs) - 1) 
     68                  ) 
     69         
     70    show_attr_labels = pyqtProperty("bool",  
     71                                   fget=get_show_attr_labels, 
     72                                   fset=set_show_attr_labels, 
     73                                   ) 
    6274     
    6375    @safe_call 
     
    7082                return QVariant(str(val)) 
    7183        elif role == Qt.BackgroundRole: 
    72             if attr == self.classVar and col == len(domain.attributes) and domain.classVar: #check if attr is actual class or a duplication in the meta attributes 
    73                 return QVariant(self.clsColor) 
     84            #check if attr is actual class or a duplication in the meta attributes 
     85            if attr == self.class_var and col == len(domain.attributes) and domain.classVar: 
     86                return QVariant(self.cls_color) 
    7487            elif attr in self.metas: 
    75                 return QVariant(self.metaColor) 
     88                return QVariant(self.meta_color) 
    7689        elif role == OWGUI.TableBarItem.BarRole and val.varType == orange.VarTypes.Continuous \ 
    7790                    and not val.isSpecial() and attr not in self.metas: 
    7891            dist = self.dist[col] 
    7992            return QVariant((float(val) - dist.min) / (dist.max - dist.min or 1)) 
    80         elif role == OWGUI.TableValueRole: # The actual value 
     93        elif role == OWGUI.TableValueRole: 
     94            # The actual value 
    8195            return QVariant(val) 
    82         elif role == OWGUI.TableClassValueRole: # The class value for the row's example 
     96        elif role == OWGUI.TableClassValueRole:  
     97            # The class value for the row's example 
    8398            return QVariant(example.get_class()) 
    84         elif role == OWGUI.TableVariable: # The variable descriptor for column 
     99        elif role == OWGUI.TableVariable:  
     100            # The variable descriptor for column 
    85101            return QVariant(val.variable) 
    86102         
     
    111127            attr = self.all_attrs[section] 
    112128            if role ==Qt.DisplayRole: 
    113                 values = [attr.name] + ([str(attr.attributes.get(label, "")) for label in self.attrLabels] if self.showAttrLabels else []) 
     129                values = [attr.name] + ([str(attr.attributes.get(label, "")) for label in self.attr_labels] if self.show_attr_labels else []) 
    114130                return QVariant("\n".join(values)) 
    115131            if role == Qt.ToolTipRole: 
    116                 pairs = [(key, str(attr.attributes[key])) for key in self.attrLabels if key in attr.attributes] 
     132                pairs = [(key, str(attr.attributes[key])) for key in self.attr_labels if key in attr.attributes] 
    117133                tip = "<b>%s</b>" % attr.name 
    118134                tip = "<br>".join([tip] + ["%s = %s" % pair for pair in pairs]) 
     
    130146        self.sorted_map = [v[1] for v in values] 
    131147        self.emit(SIGNAL("layoutChanged()")) 
    132         self.emit(SIGNAL("dataChanged(QModelIndex, QModelIndex)"), self.index(0,0), 
    133                   self.index(len(self.examples) - 1, len(self.all_attrs) - 1)) 
     148        self.emit(SIGNAL("dataChanged(QModelIndex, QModelIndex)"), 
     149                  self.index(0,0), 
     150                  self.index(len(self.examples) - 1, len(self.all_attrs) - 1) 
     151                  ) 
    134152             
    135153 
     
    482500    def drawAttributeLabels(self, table): 
    483501#        table.setHorizontalHeaderLabels(table.variableNames) 
    484         table.model().showAttrLabels = bool(self.showAttributeLabels) 
     502        table.model().show_attr_labels = bool(self.showAttributeLabels) 
    485503        if self.showAttributeLabels: 
    486504            labelnames = set() 
  • Orange/OrangeWidgets/OWGUI.py

    r10580 r10608  
    18131813            painter.drawLine(x, y, x + rect.width() * ratio, y) 
    18141814            painter.restore() 
     1815            # raise the lower edge 3 pixels up 
     1816            text_rect = option.rect.adjusted(0, 0, 0, -3) 
     1817        else: 
     1818            text_rect = option.rect 
    18151819        text = index.data(Qt.DisplayRole).toString() 
    18161820 
    1817         self.drawDisplay(painter, option, option.rect, text) 
     1821        self.drawDisplay(painter, option, text_rect, text) 
    18181822        painter.restore() 
    18191823         
     
    19601964 
    19611965class ColoredBarItemDelegate(QStyledItemDelegate): 
    1962     """ Item delegate that can also draw a distribution bar 
     1966    """ Item delegate that can also draws a distribution bar 
    19631967    """ 
    19641968    def __init__(self, parent=None, decimals=3, color=Qt.red): 
  • Orange/classification/tree.py

    r10580 r10609  
    12491249   them. The files will be modified in the 
    12501250   further process. 
    1251 #. Download 
    1252    `buildC45.zip <http://orange.biolab.si/orange/download/buildC45.zip>`_ 
    1253    and unzip its contents into the directory R8/Src of the C4.5 sources 
     1251#. Copy orng/ensemble.c and orng/buildC45.py from the 
     1252   Orange package into into the directory R8/Src of the C4.5 sources 
    12541253   (this directory contains, for instance, the file average.c). 
    1255 #. Run buildC45.py, which will build the plug-in and put it next to  
    1256    orange.pyd (or orange.so on Linux/Mac). 
     1254#. Run buildC45.py, which will build the plug-in and put it next to 
     1255   orange.pyd (or orange.so on Linux/Mac). If the script fails, try 
     1256   making all files in R8/Src writable. 
    12571257#. Run python, type ``import Orange`` and 
    12581258   create ``Orange.classification.tree.C45Learner()``. This should 
  • Orange/regression/linear.py

    r10580 r10605  
    229229        # convertion to numpy 
    230230        A, y, w = table.to_numpy() 
    231         if A is None: 
    232             n, m = len(table), 0 
    233         else: 
    234             n, m = numpy.shape(A) 
     231        n, m = numpy.shape(A) 
    235232      
    236233        if self.intercept: 
    237             if A is None: 
    238                 X = numpy.ones([n, 1]) 
    239             else: 
    240                 X = numpy.insert(A, 0, 1, axis=1) # adds a column of ones 
     234            X = numpy.insert(A, 0, 1, axis=1) # adds a column of ones 
    241235        else: 
    242236            X = A 
     
    252246         
    253247        if self.ridge_lambda: 
    254             cov += self.ridge_lambda * numpy.eye(m + self.intercept) 
     248            stride = cov.shape[0] + 1 
     249            cov.flat[self.intercept * stride::stride] += self.ridge_lambda 
    255250 
    256251        # adds some robustness by computing the pseudo inverse; 
     
    261256 
    262257        mu_y, sigma_y = numpy.mean(y), numpy.std(y) 
    263         if A is not None: 
     258        if m > 0: 
    264259            cov_x = numpy.cov(X, rowvar=0) 
    265  
    266260            # standardized coefficients 
    267261            std_coefficients = sqrt(cov_x.diagonal()) / sigma_y * coefficients 
     
    290284        r2 = ssr / sst 
    291285        r2adj = 1 - (1 - r2) * (n - 1) / (n - m - 1) 
    292         F = (ssr / m) / (sst - ssr / (n - m - 1)) 
     286        F = (ssr / m) / (sst - ssr / (n - m - 1)) if m else None 
    293287        df = n - 2 
    294288        sigma_square = sse / (n - m - 1) 
  • Orange/testing/regression/results_reference/knnInstanceDistance.py.txt

    r10009 r10598  
    11*** Reference instance:  ['young', 'myope', 'no', 'reduced', 'none'] 
    22['young', 'myope', 'no', 'reduced', 'none'], {-3:0.00} 
     3['young', 'myope', 'yes', 'reduced', 'none'], {-3:1.00} 
     4['presbyopic', 'myope', 'no', 'reduced', 'none'], {-3:1.00} 
     5['young', 'hypermetrope', 'no', 'reduced', 'none'], {-3:1.00} 
    36['young', 'myope', 'no', 'normal', 'soft'], {-3:1.00} 
    4 ['young', 'myope', 'yes', 'reduced', 'none'], {-3:1.00} 
    5 ['pre-presbyopic', 'myope', 'no', 'reduced', 'none'], {-3:1.00} 
    6 ['young', 'hypermetrope', 'no', 'reduced', 'none'], {-3:1.00} 
  • Orange/testing/regression/results_tests_20/reference_distributions.py.txt

    r10290 r10600  
    2222 
    2323Private Private Private Private Private Private Private Private Private Private Private Private Private Private Private Private Private Private Private Private 
    24 Private Self-emp-not-inc Private Private Private Private Private Private Private Private Private Private Private Private Private Private Private Private Private Private 
     24Private Self-emp-not-inc Self-emp-not-inc Private Private Self-emp-not-inc Self-emp-not-inc Private Self-emp-not-inc Private Private Self-emp-not-inc Private Self-emp-not-inc Self-emp-not-inc Private Private Private Self-emp-not-inc Self-emp-not-inc 
    2525Private:  685.0 
    2626Private:  685.0 
  • Orange/testing/regression/results_tests_20/reference_findnearest.py.txt

    r9951 r10600  
    11*** Reference example:  ['young', 'myope', 'no', 'reduced', 'none'] 
    2 ['pre-presbyopic', 'myope', 'no', 'reduced', 'none'], {-42:1.00} 
     2['presbyopic', 'myope', 'no', 'reduced', 'none'], {-42:1.00} 
    33['young', 'hypermetrope', 'no', 'reduced', 'none'], {-42:1.00} 
    44['young', 'myope', 'no', 'normal', 'soft'], {-42:1.00} 
  • Orange/testing/regression/results_tests_20/reference_random_classifier.py.txt

    r9951 r10600  
    1 ['young', 'myope', 'no', 'reduced', 'none'] hard 
     1['young', 'myope', 'no', 'reduced', 'none'] none 
    22['young', 'myope', 'no', 'normal', 'soft'] hard 
    3 ['young', 'myope', 'yes', 'reduced', 'none'] hard 
     3['young', 'myope', 'yes', 'reduced', 'none'] none 
    44['young', 'myope', 'yes', 'normal', 'hard'] hard 
    5 ['young', 'hypermetrope', 'no', 'reduced', 'none'] hard 
     5['young', 'hypermetrope', 'no', 'reduced', 'none'] none 
    66 
    7 ['young', 'myope', 'no', 'reduced', 'none'] hard 
     7['young', 'myope', 'no', 'reduced', 'none'] none 
    88['young', 'myope', 'no', 'normal', 'soft'] hard 
    9 ['young', 'myope', 'yes', 'reduced', 'none'] hard 
     9['young', 'myope', 'yes', 'reduced', 'none'] none 
    1010['young', 'myope', 'yes', 'normal', 'hard'] hard 
    11 ['young', 'hypermetrope', 'no', 'reduced', 'none'] hard 
     11['young', 'hypermetrope', 'no', 'reduced', 'none'] none 
    1212 
    13 ['young', 'myope', 'no', 'reduced', 'none'] hard 
     13['young', 'myope', 'no', 'reduced', 'none'] none 
    1414['young', 'myope', 'no', 'normal', 'soft'] hard 
    15 ['young', 'myope', 'yes', 'reduced', 'none'] hard 
     15['young', 'myope', 'yes', 'reduced', 'none'] none 
    1616['young', 'myope', 'yes', 'normal', 'hard'] hard 
    17 ['young', 'hypermetrope', 'no', 'reduced', 'none'] hard 
     17['young', 'hypermetrope', 'no', 'reduced', 'none'] none 
    1818 
  • Orange/testing/regression/results_tutorial/ensemble3.py.txt

    r9953 r10600  
    11        Learner   CA     Brier Score 
    22        default:  0.473  0.501 
    3     k-NN (k=11):  0.861  0.231 
    4     bagged k-NN:  0.854  0.249 
    5    boosted k-NN:  0.843  0.261 
     3    k-NN (k=11):  0.881  0.233 
     4    bagged k-NN:  0.825  0.252 
     5   boosted k-NN:  0.853  0.238 
  • Orange/testing/regression/results_tutorial/handful.py.txt

    r9953 r10600  
    66(democrat  )   0.386         0.995         0.011         0.048         
    77(democrat  )   0.386         0.002         0.015         0.000         
    8 (democrat  )   0.386         0.043         0.015         0.015         
    9 (democrat  )   0.386         0.228         0.015         0.191         
    10 (democrat  )   0.386         1.000         0.973         0.776         
     8(democrat  )   0.386         0.043         0.015         0.018         
     9(democrat  )   0.386         0.228         0.015         0.192         
     10(democrat  )   0.386         1.000         0.973         0.665         
    1111(republican)   0.386         1.000         0.973         0.861         
    1212(republican)   0.386         1.000         0.973         1.000         
  • Orange/testing/unit/tests/test_table.py

    r10551 r10597  
    128128            f.flush() 
    129129            table1 = Orange.data.Table(f.name) 
    130          
     130 
     131 
     132@testing.datasets_driven 
     133class TestHashing(unittest.TestCase): 
     134 
     135    @testing.test_on_data 
     136    def test_uniqueness(self, name): 
     137        """ Test the uniqueness of hashes. This is probabilistic, 
     138        but if we hit a collision in one of documentation datasets, 
     139        then it's time to open a bottle of Champagne ... 
     140        """ 
     141        table = Orange.data.Table(name) 
     142        self.assertEquals(len(set(table)), len(set(hash(i) for i in table))) 
     143 
     144    @testing.test_on_data 
     145    def test_repetitiveness(self, name): 
     146        """ Test whether a data instance gets the same hash twice. 
     147        """ 
     148        table = Orange.data.Table(name) 
     149        a = [hash(i) for i in table] 
     150        # Copy and reverse the table prior to hashing - just to hopefully 
     151        # make more bugs stand out. 
     152        b = list(reversed([hash(i) for i in 
     153                           reversed(Orange.data.Table(table))])) 
     154 
     155        self.assertEquals(a, b) 
    131156 
    132157 
  • install-scripts/mac/dailyrun-finkonly.sh

    r10556 r10594  
    2323fi 
    2424 
     25 
    2526if [ ! -e $WORK_DIR ]; then 
    2627    mkdir -p $WORK_DIR 
     28fi 
     29 
     30 
     31if [ ! $LOCAL ]; then 
     32    /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
    2733fi 
    2834 
     
    5460if [ ! $LOCAL ]; then 
    5561    # Compare with the published info files 
    56     BASE="http://orange.biolab.si/fink/dists/$ARCH/main/finkinfo" 
     62    BASE="http://orange.biolab.si/fink/dists/10.$MAC_VERSION/main/finkinfo" 
    5763else 
    5864    # Compare with the local info files 
     
    9197fi 
    9298 
    93 # Directory where fink .info templates are 
    94 FINK_TEMPLATES=$WORK_DIR/repos/orange/install-scripts/mac/fink 
     99# Directory where fink .info templates are stored 
     100FINK_TEMPLATES=$WORK_DIR/fink 
     101 
     102if [ ! -e $FINK_TEMPLATES ]; then 
     103    mkdir -p $FINK_TEMPLATES 
     104fi 
    95105 
    96106FINK_LOG=$WORK_DIR/fink-daily-build.log 
     
    100110if [[ $NEW_ORANGE || $FORCE ]]; then 
    101111    FINK_ORANGE_SOURCE_TEMPLATE="Orange-%v.tar.gz" 
     112    curl --silent -o $FINK_TEMPLATES/orange-gui-hg-py.info https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/fink/orange-gui-hg-py.info 
    102113    ./fink-register-info.sh "$FINK_TEMPLATES/orange-gui-hg-py.info" $BASE_URL/$FINK_ORANGE_SOURCE_TEMPLATE $ORANGE_SOURCE_MD5 $ORANGE_VERSION $FINK_INFO_DIR/orange-gui-hg-py.info >> $FINK_LOG 2>&1 
    103114fi 
     
    105116if [[ $NEW_BIOINFORMATICS || $FORCE ]]; then 
    106117    FINK_BIOINFORMATICS_SOURCE_TEMPLATE="Orange-Bioinformatics-%v.tar.gz" 
     118    curl --silent -o $FINK_TEMPLATES/orange-bioinformatics-gui-hg-py.info https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/fink/orange-bioinformatics-gui-hg-py.info 
    107119    ./fink-register-info.sh "$FINK_TEMPLATES/orange-bioinformatics-gui-hg-py.info" $BASE_URL/$FINK_BIOINFORMATICS_SOURCE_TEMPLATE $BIOINFORMATICS_SOURCE_MD5 $BIOINFORMATICS_VERSION $FINK_INFO_DIR/orange-bioinformatics-gui-hg-py.info >> $FINK_LOG 2>&1 
    108120fi 
     
    110122if [[ $NEW_TEXT || $FORCE ]]; then 
    111123    FINK_TEXT_SOURCE_TEMPLATE="Orange-Text-Mining-%v.tar.gz" 
     124    curl --silent -o $FINK_TEMPLATES/orange-text-gui-hg-py.info https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/fink/orange-text-gui-hg-py.info 
    112125    ./fink-register-info.sh "$FINK_TEMPLATES/orange-text-gui-hg-py.info" $BASE_URL/$FINK_TEXT_SOURCE_TEMPLATE $TEXT_SOURCE_MD5 $TEXT_VERSION $FINK_INFO_DIR/orange-text-gui-hg-py.info >> $FINK_LOG 2>&1 
    113126fi 
  • install-scripts/mac/fink-daily-build-packages.sh

    r10556 r10594  
    7676 
    7777# Move info files from local/main/finkinfo (put there by dailyru[-finkonly].sh 
    78 echo "Updating new fink info files." 
    79 mv $FINK_ROOT/fink/dists/local/main/finkinfo/*.info $FINK_ROOT/fink/dists/biolab/main/finkinfo/ 
     78if [ -e $FINK_ROOT/fink/dists/local/main/finkinfo/*.info ]; then 
     79    echo "Updating new fink info files." 
     80    mv $FINK_ROOT/fink/dists/local/main/finkinfo/*.info $FINK_ROOT/fink/dists/biolab/main/finkinfo/ 
     81fi 
    8082 
    8183if ! grep '^Trees:' $FINK_ROOT/etc/fink.conf | grep -q 'biolab/main'; then 
  • install-scripts/mac/fink/orange-bioinformatics-gui-hg-py.info

    r10444 r10602  
    1111Depends: << 
    1212    python%type_pkg[python], 
    13     orange-gui-hg-py%type_pkg[python] (>= %v), 
     13    orange-gui-hg-py%type_pkg[python], 
    1414    orange-bioinformatics-hg-py%type_pkg[python] (>= %v), 
    1515    openbabel-py%type_pkg[python] (>= 2.0.0) 
     
    3030    Depends: << 
    3131        python%type_pkg[python], 
    32         orange-hg-py%type_pkg[python] (>= %v), 
     32        orange-hg-py%type_pkg[python], 
    3333        pil-py%type_pkg[python], 
    3434        suds-py%type_pkg[python], 
    35         setuptools-py%type_pkg[python] 
     35        distribute-py%type_pkg[python] 
    3636 
    3737    << 
  • install-scripts/mac/fink/orange-gui-hg-py.info

    r10454 r10602  
    1919    sip-py%type_pkg[python], 
    2020    graphviz, 
    21     setuptools-py%type_pkg[python] 
     21    distribute-py%type_pkg[python] 
    2222<< 
    2323BuildDepends: << 
  • install-scripts/mac/fink/orange-text-gui-hg-py.info

    r10442 r10602  
    1111Depends: << 
    1212    python%type_pkg[python], 
    13     orange-gui-hg-py%type_pkg[python] (>= %v), 
    14     orange-text-hg-py%type_pkg[python] (>= %v) 
     13    orange-gui-hg-py%type_pkg[python], 
     14    orange-text-hg-py%type_pkg[python] (>= %v), 
     15    distribute-py%type_pkg[python] 
    1516<< 
    1617Conflicts: orange-text, orange-text-svn 
  • source/include/crc.h

    r10591 r10596  
    2222#define __CRC_H 
    2323 
    24 extern unsigned long crc_table[256]; 
     24extern unsigned int crc_table[256]; 
    2525 
    2626#define INIT_CRC(x) (x) = 0xffffffff 
     
    3232      crc = (crc >> 8) ^ crc_table[(crc & 0xFF) ^ *(b++)]); \ 
    3333 
    34 inline void add_CRC(const int data, unsigned long &crc) 
     34inline void add_CRC(const int data, unsigned int &crc) 
    3535{ ADD_CRC } 
    3636 
    37 inline void add_CRC(const unsigned long data, unsigned long &crc) 
     37inline void add_CRC(const unsigned long data, unsigned int &crc) 
    3838{ ADD_CRC } 
    3939 
    40 inline void add_CRC(const float data, unsigned long &crc) 
     40inline void add_CRC(const float data, unsigned int &crc) 
    4141{ ADD_CRC } 
    4242 
    43 inline void add_CRC(const unsigned char c, unsigned long &crc) 
     43inline void add_CRC(const unsigned char c, unsigned int &crc) 
    4444{ crc = (crc >> 8) ^ crc_table[(crc & 0xFF) ^ c]; } 
    4545 
    46 inline void add_CRC(const char *c, unsigned long &crc) 
     46inline void add_CRC(const char *c, unsigned int &crc) 
    4747{ 
    4848  for(; *c; add_CRC((unsigned char)*c++, crc)); 
  • source/include/crc32.cpp

    r3289 r10596  
    1 unsigned long crc_table[256]; 
     1unsigned int crc_table[256]; 
    22 
    3 long reflect(unsigned long ref, char ch)  
    4 { unsigned long value(0);  
     3int reflect(unsigned int ref, char ch) 
     4{ unsigned int value(0); 
    55 
    66  for(int i = 1; i < (ch + 1); i++) { 
  • source/orange/distvars.cpp

    r8103 r10596  
    753753  int i, e; 
    754754 
    755   unsigned long crc; 
     755  unsigned int crc; 
    756756  INIT_CRC(crc); 
    757757 
     
    909909 
    910910int TDiscDistribution::sumValues() const 
    911 { unsigned long crc; 
     911{ unsigned int crc; 
    912912  INIT_CRC(crc); 
    913913 
     
    12941294 
    12951295int TContDistribution::sumValues() const 
    1296 { unsigned long crc; 
     1296{ unsigned int crc; 
    12971297  INIT_CRC(crc); 
    12981298 
     
    13831383 
    13841384int TGaussianDistribution::sumValues() const 
    1385 { unsigned long crc; 
     1385{ unsigned int crc; 
    13861386  INIT_CRC(crc); 
    13871387  add_CRC(mean, crc); 
  • source/orange/domain.cpp

    r9415 r10596  
    618618#include "crc.h" 
    619619 
    620 void TDomain::addToCRC(unsigned long &crc) const 
     620void TDomain::addToCRC(unsigned int &crc) const 
    621621{ 
    622622  const_PITERATE(TVarList, vi, variables) { 
     
    631631 
    632632int TDomain::sumValues() const 
    633 { unsigned long crc; 
     633{ unsigned int crc; 
    634634  INIT_CRC(crc); 
    635635  addToCRC(crc); 
  • source/orange/domain.hpp

    r9417 r10596  
    150150  PVariable hasOtherAttributes(bool checkClass = true) const; 
    151151   
    152   void addToCRC(unsigned long &crc) const; 
     152  void addToCRC(unsigned int &crc) const; 
    153153  int sumValues() const; 
    154154}; 
  • source/orange/examplegen.cpp

    r6531 r10596  
    9696 
    9797int TExampleGenerator::checkSum(const bool includeMetas) 
    98 { unsigned long crc; 
     98{ unsigned int crc; 
    9999  INIT_CRC(crc); 
    100100  for(TExampleIterator ei(begin()); ei; ++ei) 
  • source/orange/examples.cpp

    r10591 r10596  
    383383#include "stringvars.hpp" 
    384384 
    385 inline void addToCRC(unsigned long &crc, const PVarList &vars, TValue *&vli) 
     385inline void addToCRC(unsigned int &crc, const PVarList &vars, TValue *&vli) 
    386386{ 
    387387  const_PITERATE(TVarList, vi, vars) { 
     
    400400} 
    401401 
    402 void TExample::addToCRC(unsigned long &crc, const bool includeMetas) const 
     402void TExample::addToCRC(unsigned int &crc, const bool includeMetas) const 
    403403{ 
    404404  TValue *vli = values; 
     
    426426 
    427427int TExample::sumValues(const bool includeMetas) const 
    428 { unsigned long crc; 
     428{ unsigned int crc; 
    429429  INIT_CRC(crc); 
    430430  addToCRC(crc, includeMetas); 
  • source/orange/examples.hpp

    r9401 r10596  
    156156  bool compatible(const TExample &other, const bool ignoreClass = false) const; 
    157157 
    158   void addToCRC(unsigned long &crc, const bool includeMetas = false) const; 
     158  void addToCRC(unsigned int &crc, const bool includeMetas = false) const; 
    159159  int sumValues(const bool includeMetas = false) const; 
    160160   
  • source/orange/lib_kernel.cpp

    r10593 r10606  
    28662866TExampleTable *readListOfExamples(PyObject *args) 
    28672867{ 
    2868   if (isSomeNumeric_wPrecheck(args)) 
    2869     return readListOfExamples(args, PDomain(), false); 
     2868    if (isSomeNumeric_wPrecheck(args)) 
     2869      return readListOfExamples(args, PDomain(), false); 
     2870 
    28702871 
    28712872  if (PySequence_Check(args)) { 
     
    29162917    array = (PyArrayObject *)(args); 
    29172918    mask = (PyArrayObject *)PyObject_GetAttrString(args, "mask"); 
    2918     if (PyBool_Check((PyObject *)mask)) { 
     2919    if (!mask) { 
     2920        PyErr_Clear(); 
     2921    } 
     2922    else if (!isSomeNumeric_wPrecheck((PyObject *)mask)) { 
    29192923      Py_DECREF((PyObject *)mask); 
    29202924      mask = NULL; 
  • source/orange/numeric_interface.cpp

    r6531 r10603  
    9292   
    9393bool isSomeMaskedNumeric_wPrecheck(PyObject *args) { 
    94   static char *numericNames[] = {"numpy.core.ma.MaskedArray", "numarray.ma.MA.MaskedArray", 0}; 
     94  static char *numericNames[] = {"MaskedArray", "numpy.ma.core.MaskedArray", "numarray.ma.MA.MaskedArray", 0}; 
    9595  for(char **nni = numericNames; *nni; nni++) 
    9696    if (!strcmp(args->ob_type->tp_name, *nni)) 
  • source/orange/table.cpp

    r9411 r10596  
    875875 
    876876int TExampleTable::checkSum(const bool includeMetas) 
    877 { unsigned long crc; 
     877{ unsigned int crc; 
    878878  INIT_CRC(crc); 
    879879 
     
    885885 
    886886int TExampleTable::checkSum(const bool includeMetas) const 
    887 { unsigned long crc; 
     887{ unsigned int crc; 
    888888  INIT_CRC(crc); 
    889889 
Note: See TracChangeset for help on using the changeset viewer.