| 145 | |
| 146 | template <typename A> |
| 147 | bp::object axis_getitem(const A& a, int i) { |
| 148 | if (i < -(a.uoflow() == 2) || i >= (a.size() + int(a.uoflow() > 0))) |
| 149 | throw std::out_of_range("index out of bounds"); |
| 150 | return bp::make_tuple(a.lower(i), a.lower(i + 1)); |
| 151 | } |
| 152 | |
| 153 | template <> |
| 154 | bp::object axis_getitem<bha::category<>>(const bha::category<>& a, int i) { |