Changeset 10603:72edca6ef4bc in orange


Ignore:
Timestamp:
03/21/12 18:16:46 (2 years ago)
Author:
Janez Demšar <janez.demsar@…>
Branch:
default
Children:
10604:64263715a776, 10606:4ea62a7a1910
Message:

Fixed the code for constructing ExampleTable from masked array

Location:
source/orange
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/orange/lib_kernel.cpp

    r10593 r10603  
    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       Py_DECREF((PyObject *)mask); 
    2920       mask = NULL; 
     2919    if (!mask) { 
     2920        PyErr_Clear(); 
    29212921    } 
    29222922  } 
  • 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)) 
Note: See TracChangeset for help on using the changeset viewer.