toPyModel(model_ptr) -> svm_model Convert a ctypes POINTER(svm_model) to a Python svm_model
(model_ptr)
| 297 | return result |
| 298 | |
| 299 | def toPyModel(model_ptr): |
| 300 | """ |
| 301 | toPyModel(model_ptr) -> svm_model |
| 302 | |
| 303 | Convert a ctypes POINTER(svm_model) to a Python svm_model |
| 304 | """ |
| 305 | if bool(model_ptr) == False: |
| 306 | raise ValueError("Null pointer") |
| 307 | m = model_ptr.contents |
| 308 | m.__createfrom__ = 'C' |
| 309 | return m |
| 310 | |
| 311 | fillprototype(libsvm.svm_train, POINTER(svm_model), [POINTER(svm_problem), POINTER(svm_parameter)]) |
| 312 | fillprototype(libsvm.svm_cross_validation, None, [POINTER(svm_problem), POINTER(svm_parameter), c_int, POINTER(c_double)]) |
no outgoing calls
no test coverage detected
searching dependent graphs…