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

Function element_getitem

src/python/histogram.cpp:342–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340double element_variance(const pyhistogram::element_type& b) { return b.variance(); }
341
342double element_getitem(const pyhistogram::element_type& e, int i) {
343 if (i < 0 || i > 1) throw std::out_of_range("element_getitem");
344 return i == 0 ? e.value() : e.variance();
345}
346
347int element_len(const pyhistogram::element_type&) { return 2; }
348

Callers

nothing calls this directly

Calls 2

valueMethod · 0.45
varianceMethod · 0.45

Tested by

no test coverage detected