Conversation
…ean/WeightedMean storage Agent-Logs-Url: https://github.com/scikit-hep/boost-histogram/sessions/8c7fdc00-d667-4e69-8b12-fe3a2120c3c7 Co-authored-by: henryiii <4616906+henryiii@users.noreply.github.com>
|
@copilot, please run |
… annotations Agent-Logs-Url: https://github.com/scikit-hep/boost-histogram/sessions/0b169d7b-303b-4a45-9f8d-505c313c3493 Co-authored-by: henryiii <4616906+henryiii@users.noreply.github.com>
Fixed in 7310c9d. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
There was a problem hiding this comment.
Pull request overview
This PR fixes filling Mean/WeightedMean histograms when positional axis arguments are scalars but sample is an array-like, by broadcasting those scalar axis arguments to the sample length (addressing issue #727).
Changes:
- Add scalar positional-arg broadcasting in
Histogram.fillwhensampleis array-like. - Improve
_fill_casttyping via overloads and remove some type-ignores. - Add regression tests covering scalar-axis + array-sample filling for Mean and WeightedMean storages.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/boost_histogram/histogram.py |
Broadcast scalar positional args based on sample length; tighten typing for _fill_cast; adjust threaded split casting. |
tests/test_profiles.py |
Add tests validating scalar-axis broadcast behavior for Mean/WeightedMean storages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
fillmethodtest_profiles.pynp.ndimfor general array checkprek -aand fix mypy type errors (addedtype: ignoreannotations andis not Noneguard)💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.