Ignore:
Timestamp:
03/21/12 12:22:17 (2 years ago)
Author:
Janez Demšar <janez.demsar@…>
Branch:
default
Children:
10594:23b10aabc543, 10610:244e64e24d49
Message:

When calling to_numpy("c") on a classless domain, it now returns an empty numpy array of size
(no_of_examples, 0).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/orange/lib_kernel.cpp

    r10588 r10593  
    34703470    double *Xp, *yp, *myp, *wp; 
    34713471    signed char *mp = NULL, *mpy = NULL, *mpmy = NULL; 
    3472     if (columns) { 
    3473       X = PyObject_CallFunction(mzeros, "(ii)s", rows, columns, "d"); 
    3474       if (!X) 
     3472    X = PyObject_CallFunction(mzeros, "(ii)s", rows, columns, "d"); 
     3473    if (!X) 
    34753474        return PYNULL; 
    3476  
    3477       Xp = (double *)((PyArrayObject *)X)->data; 
    3478  
    3479       if (maskedArray) { 
     3475    Xp = columns ? (double *)((PyArrayObject *)X)->data : NULL; 
     3476    if (maskedArray) { 
    34803477        mask = PyObject_CallFunction(mzeros, "(ii)s", rows, columns, "b"); 
    34813478        mp = (signed char *)((PyArrayObject *)mask)->data; 
    3482       } 
    3483     } 
    3484     else { 
    3485       X = Py_None; 
    3486       Py_INCREF(X); 
    3487       Xp = NULL; 
    34883479    } 
    34893480 
Note: See TracChangeset for help on using the changeset viewer.