Changeset 10254:7e2a93fdb685 in orange


Ignore:
Timestamp:
02/15/12 16:18:06 (2 years ago)
Author:
ales_erjavec
Branch:
default
Message:

Fixed some warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/data/io.py

    r10142 r10254  
    390390    f.write(')\n') 
    391391 
     392 
    392393def toLibSVM(filename, example): 
    393394    """Save class:`Orange.data.Table` to file in LibSVM format""" 
     
    395396    Orange.classification.svm.tableToSVMFormat(example, open(filename, "wb")) 
    396397 
     398 
     399@Orange.misc.deprecated_keywords({"createOnNew": "create_on_new"}) 
    397400def loadLibSVM(filename, create_on_new=MakeStatus.Incompatible, **kwargs): 
    398401    """Return class:`Orange.data.Table` containing data from file in LibSVM format""" 
     
    420423    domain = Orange.data.Domain(attributes, classVar) 
    421424    table = Orange.data.Table([Orange.data.Instance(domain, [ex.get(attr, attr("?")) for attr in attributes] + [c]) for ex, c in zip(values, classes)]) 
    422     table.attribute_load_status = attributeLoadStatus 
     425    table.setattr("attribute_load_status", attributeLoadStatus) 
    423426    return table 
     427 
    424428loadLibSVM = Orange.misc.deprecated_keywords( 
    425429{"createOnNew": "create_on_new"} 
     
    723727            ex[var] = var(val) 
    724728 
    725     table.metaAttributeLoadStatus = meta_attribute_load_status 
    726     table.attributeLoadStatus = attribute_load_status 
     729    table.setattr("meta_attribute_load_status", meta_attribute_load_status) 
     730    table.setattr("attribute_load_status", attribute_load_status) 
    727731 
    728732    return table 
Note: See TracChangeset for help on using the changeset viewer.