Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update Numpy and the matching syntax #285

Merged
merged 4 commits into from
Aug 10, 2021

Conversation

amangoel185
Copy link
Collaborator

@amangoel185 amangoel185 commented Aug 10, 2021

Fixes Hist part for #245.

src/hist/plot.py Outdated Show resolved Hide resolved
@@ -651,7 +658,9 @@ def _plot_ratiolike(
)

elif view == "pull":
pulls = (hist_values - compare_values) / hist_values_uncert
pulls: np.typing.NDArray[Any] = (
Copy link
Member

Choose a reason for hiding this comment

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

We should check and see why this requires a type now - one of the three input values here (hist_values, compare_values, hist_values_uncert) might be missing a type. Don't have to happen in this PR though.

Copy link
Member

Choose a reason for hiding this comment

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

From @amangoel185:

reveal_type on the values gives:

src/hist/plot.py:661: note: Revealed type is "numpy.ndarray[Any, Any]" # hist_values
src/hist/plot.py:662: note: Revealed type is "numpy.ndarray[Any, numpy.dtype[Any]]" # compare_values
src/hist/plot.py:663: note: Revealed type is "numpy.ndarray[Any, numpy.dtype[Any]]" # hist_values_uncert

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.

2 participants