Changeset 10142:b59530f16d2e in orange


Ignore:
Timestamp:
02/08/12 22:22:47 (2 years ago)
Author:
ales_erjavec
Branch:
default
rebase_source:
326f0035aa127e7afca31f6579b467649aa77d47
Message:

Fixed load_csv (use of variable.make).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/data/io.py

    r10030 r10142  
    633633            undefined_vars.append((i, variables[-1])) 
    634634        elif var_t == variable.Continuous: 
    635             variables.append(variable.make(name, Orange.feature.Type.Continuous, [], [], create_new_on)) 
     635            variables.append(make(name, Orange.feature.Type.Continuous, [], [], create_new_on)) 
    636636        elif var_t == variable.String: 
    637             variables.append(variable.make(name, Orange.feature.Type.String, [], [], create_new_on)) 
     637            variables.append(make(name, Orange.feature.Type.String, [], [], create_new_on)) 
    638638        elif var_t == variable.Python: 
    639639            variables.append(variable.Python(name)) 
     
    641641            var_t, values = var_t 
    642642            if var_t == variable.Discrete: 
    643                 variables.append(variable.make(name, Orange.feature.Type.Discrete, values, [], create_new_on)) 
     643                variables.append(make(name, Orange.feature.Type.Discrete, values, [], create_new_on)) 
    644644            elif var_t == variable.Python: 
    645645                raise NotImplementedError() 
     
    658658        values = sorted(values) 
    659659        if isinstance(var_def, _disc_placeholder): 
    660             variables[ind] = variable.make(var_def.name, Orange.feature.Type.Discrete, [], values, create_new_on) 
     660            variables[ind] = make(var_def.name, Orange.feature.Type.Discrete, [], values, create_new_on) 
    661661        elif isinstance(var_def, _var_placeholder): 
    662662            if is_variable_cont(values): 
    663                 variables[ind] = variable.make(var_def.name, Orange.feature.Type.Continuous, [], [], create_new_on) 
     663                variables[ind] = make(var_def.name, Orange.feature.Type.Continuous, [], [], create_new_on) 
    664664            elif is_variable_discrete(values): 
    665                 variables[ind] = variable.make(var_def.name, Orange.feature.Type.Discrete, [], values, create_new_on) 
     665                variables[ind] = make(var_def.name, Orange.feature.Type.Discrete, [], values, create_new_on) 
    666666            elif is_variable_string(values): 
    667                 variables[ind] = variable.make(var_def.name, Orange.feature.Type.String, [], [], create_new_on) 
     667                variables[ind] = make(var_def.name, Orange.feature.Type.String, [], [], create_new_on) 
    668668            else: 
    669669                raise ValueError("Strange column in the data") 
Note: See TracChangeset for help on using the changeset viewer.