support repr for histogram in python

This commit is contained in:
hans.dembinski@gmail.com
2017-03-22 18:38:18 +01:00
parent 54a7a248e1
commit 5a7b7b09b6
8 changed files with 168 additions and 80 deletions

View File

@@ -93,19 +93,7 @@ category_axis_init(python::tuple args, python::dict kwargs) {
template <typename T>
int
axis_len(const T& t) {
return t.bins() + 1;
}
template <>
int
axis_len(const category_axis& t) {
return t.bins();
}
template <>
int
axis_len(const integer_axis& t) {
return t.bins();
return t.bins() + int(std::is_floating_point<typename T::value_type>::value);
}
template <typename T>