You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I might have missed something, but I can't figure out a clean way to fill a dynamic rank histogram with inputs that also dynamic without using fill and some slightly weird reformatting for the inputs.
Specifically I have something like this
namespacebh= boost::histogram;
usingdax_t = bh::axis::regular<double>;
std::vector<dax_t> axes {
dax_t(1, -0.5, 0.5, "ax0"),
dax_t(1, -0.5, 0.5, "ax1")
};
auto hdyn = bh::make_weighted_histogram(axes);
// seems we need to do some funny organization to make weighting// work with dynamic axes.
std::vector<std::vector<double>> vals { {0}, {0} };
hdyn.fill(vals, bh::weight(0.5));
If I try to fill with a std::vector<double> vals {0, 0}; and using hdyn(vals, bh::weight(0.5)); I get a number of arguments != histogram rank exception. Of course calling hdyn(0, 0, bh::weight(0.5)) works fine, but that sort of limits the dynamic part of the dynamic axes.
To be clear, what I have works fine and everything else about this library is amazing. And I don't have much of a use case for dynamic axes anyway, so this is more of a curiosity.
The text was updated successfully, but these errors were encountered:
I might have missed something, but I can't figure out a clean way to fill a dynamic rank histogram with inputs that also dynamic without using
fill
and some slightly weird reformatting for the inputs.Specifically I have something like this
If I try to fill with a
std::vector<double> vals {0, 0};
and usinghdyn(vals, bh::weight(0.5));
I get anumber of arguments != histogram rank
exception. Of course callinghdyn(0, 0, bh::weight(0.5))
works fine, but that sort of limits the dynamic part of the dynamic axes.To be clear, what I have works fine and everything else about this library is amazing. And I don't have much of a use case for dynamic axes anyway, so this is more of a curiosity.
The text was updated successfully, but these errors were encountered: