Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/bh_python/register_histogram.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ auto register_histogram(py::module& m, const char* name, const char* desc) {
.def(
"sum",
[](const histogram_t& self, bool flow) {
py::gil_scoped_release release;
return bh::algorithm::sum(
self, flow ? bh::coverage::all : bh::coverage::inner);
},
Expand All @@ -181,19 +182,22 @@ auto register_histogram(py::module& m, const char* name, const char* desc) {
.def(
"empty",
[](const histogram_t& self, bool flow) {
py::gil_scoped_release release;
return bh::algorithm::empty(
self, flow ? bh::coverage::all : bh::coverage::inner);
},
"flow"_a = false)

.def("reduce",
[](const histogram_t& self, py::args args) {
py::gil_scoped_release release;
return bh::algorithm::reduce(
self, py::cast<std::vector<bh::algorithm::reduce_command>>(args));
})

.def("project",
[](const histogram_t& self, py::args values) {
py::gil_scoped_release release;
return bh::algorithm::project(self,
py::cast<std::vector<unsigned>>(values));
})
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nox

ALL_PYTHONS = ["3.6", "3.7", "3.8", "3.9"]
ALL_PYTHONS = ["3.6", "3.7", "3.8", "3.9", "3.10"]

nox.options.sessions = ["lint", "tests"]

Expand Down