mirror of
https://github.com/boostorg/histogram.git
synced 2026-01-30 07:52:11 +00:00
simpler
This commit is contained in:
@@ -142,10 +142,8 @@ struct axes_appender {
|
||||
bp::object histogram_axis(const pyhistogram &self, int i) {
|
||||
if (i < 0)
|
||||
i += self.dim();
|
||||
if (i < 0 || i >= int(self.dim())) {
|
||||
PyErr_SetString(PyExc_IndexError, "axis index out of range");
|
||||
bp::throw_error_already_set();
|
||||
}
|
||||
if (i < 0 || i >= int(self.dim()))
|
||||
throw std::out_of_range("axis index out of range");
|
||||
return boost::apply_visitor(axis_visitor(), self.axis(i));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user