Changeset 4634:b1fa26cbc170 in orange


Ignore:
Timestamp:
05/09/08 22:46:09 (6 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Convert:
fe77fd001df8e91fdf44241e0aeba2d4a2e2ce98
Message:
  • ttest_ind now accepts lists of different lengths
File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/statc/statc.cpp

    r4290 r4634  
    11061106 
    11071107T_T_FROM_LIST_T(ttest_1samp) 
    1108 T_T_FROM_LIST_LIST(ttest_ind) 
    11091108T_T_FROM_LIST_LIST(ttest_rel) 
     1109 
     1110PyObject *py_ttest_ind(PyObject *, PyObject *args) 
     1111{ PyTRY 
     1112    vector<double> x, y; 
     1113    if (args22listsne(args, x, y)) { 
     1114      double res1, res2; 
     1115      res1=ttest_ind(x, y, res2); 
     1116      return Py_BuildValue("dd", res1, res2); 
     1117    } 
     1118    
     1119    PyErr_Clear(); 
     1120    
     1121    vector<PyWrapper> wx, wy; 
     1122    if (args22wlistsne(args, wx, wy)) { 
     1123      PyWrapper res1, res2; 
     1124      res1=ttest_ind(wx, wy, res2); 
     1125      return Py_BuildValue("NN", (PyObject *)res1, (PyObject *)res2); 
     1126    } 
     1127     
     1128    PYERROR(PyExc_AttributeError, "ttest_ind: two lists of equal size expected", PYNULL); 
     1129  PyCATCH 
     1130} 
    11101131 
    11111132PyObject *py_chisquare(PyObject *, PyObject *args) 
Note: See TracChangeset for help on using the changeset viewer.