Skip to content

Conversation

@SimonHeybrock
Copy link
Member

@SimonHeybrock SimonHeybrock commented Oct 20, 2023

Fixes #3126.

As discussed in the linked issue, directly supporting all possible dtype combinations would require a very large number of template instantiations. With the change here I am converting to the common type of coord and edges, which avoid this. We thus have only 4*4+1*4 = 20 cases. Otherwise it would be 4*4*4+1*4 = 68.

This adds common_type, which may be useful for other applications. Maybe it would even be worth exposing to Python?

Unrelated, I got a lot of compiler warnings about passing std::string_view by value, which apparently even made compilation fail with our current settings. I added references everywhere.

Values{19, 12, 12}));
}

TEST_F(Histogram1DTest, int64_weights) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add a test for int32?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the other 10+ cases? What would we gain?

See also discussion in #3251.

SimonHeybrock and others added 2 commits October 25, 2023 07:56
Co-authored-by: Neil Vaytet <39047984+nvaytet@users.noreply.github.com>
@SimonHeybrock SimonHeybrock requested a review from nvaytet October 26, 2023 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot histogram integer count data

3 participants