Skip to content

Commit

Permalink
fix: ensure consistent passing
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Jan 21, 2022
1 parent 16f3045 commit 1b1d7d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/bh_python/register_axis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#include <vector>

template <class T>
auto vectorize_index(T input) {
return py::vectorize(input);
auto vectorize_index(T&& input) {
return py::vectorize(std::forward<T>(input));
}

// we overload vectorize index for category axis
Expand Down Expand Up @@ -66,8 +66,8 @@ auto vectorize_index(int (bh::axis::category<T, metadata_t, Options>::*pindex)(c
}

template <class T>
auto vectorize_value(T input) {
return py::vectorize(input);
auto vectorize_value(T&& input) {
return py::vectorize(std::forward<T>(input));
}
// we overload vectorize value for category axis
template <class R, class U, class Options>
Expand Down

0 comments on commit 1b1d7d7

Please sign in to comment.