We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bed689 commit edafa1dCopy full SHA for edafa1d
onedal/svm/backend/svm_py.cpp
@@ -286,7 +286,10 @@ PyObject *svm_infer<Task>::get_labels() {
286
// attributes from infer_result
287
template <typename Task>
288
PyObject *svm_infer<Task>::get_decision_function() {
289
- return convert_to_numpy(infer_result_.get_decision_function());
+ if constexpr (std::is_same_v<Task, svm::task::classification>) {
290
+ return convert_to_numpy(infer_result_.get_decision_function());
291
+ }
292
+ return nullptr;
293
}
294
295
template class ONEDAL_BACKEND_EXPORT svm_model<svm::task::classification>;
0 commit comments