MCPcopy Create free account
hub / github.com/boostorg/histogram / axes_appender

Class axes_appender

src/python/histogram.cpp:123–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121};
122
123struct axes_appender {
124 bp::object obj;
125 pyhistogram::axes_type& axes;
126 bool& success;
127 axes_appender(bp::object o, pyhistogram::axes_type& a, bool& s)
128 : obj(o), axes(a), success(s) {}
129 template <typename A>
130 void operator()(const A&) const {
131 if (success) return;
132 bp::extract<const A&> get_axis(obj);
133 if (get_axis.check()) {
134 axes.emplace_back(get_axis());
135 success = true;
136 }
137 }
138};
139
140bp::object histogram_axis(const pyhistogram& self, int i) {
141 if (i < 0) i += self.dim();

Callers 1

histogram_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected