Skip to content

Commit

Permalink
[classify]: Bind label(), total_labels() for MulticlassDatasetView.
Browse files Browse the repository at this point in the history
  • Loading branch information
skystrife committed Aug 5, 2018
1 parent bd39d26 commit 86922bc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/metapy_classify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,14 @@ void metapy_bind_classify(py::module& m)
return make_sliced_dataset_view(mdv, slice);
},
py::keep_alive<0, 1>())
.def("total_labels", &classify::multiclass_dataset_view::total_labels)
.def("label", &classify::multiclass_dataset_view::label)
.def("labels",
[](const classify::multiclass_dataset_view& self) {
return py::make_iterator(self.labels_begin(),
self.labels_end());
},
py::keep_alive<0, 1>())
.def("create_even_split",
[](const classify::multiclass_dataset_view& mdv) {
return mdv.create_even_split();
Expand Down

0 comments on commit 86922bc

Please sign in to comment.