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

fix: pull out .data from NumpyArray #985

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

agoose77
Copy link
Collaborator

No description provided.

@agoose77 agoose77 marked this pull request as ready for review October 12, 2023 15:52
@jpivarski
Copy link
Member

starterkit.web.cern.ch just started working again in #971, so I'm going to just try re-running the failed tests to see if they work here, too.

@jpivarski
Copy link
Member

In the results of fgrep -rl '.asarray(' src (on main):

  • src/uproot/_util.py:
    • used in ensure_numpy
  • src/uproot/containers.py: nothing that could be a Content
  • src/uproot/writing/_cascadetree.py:
    • used on the output of ak.num and ak.flatten, but those are all implicitly highlevel=True
    • used on branch_array.layout.offsets and layout.offsets (Index)
    • used on branch_array and content, which might be Content
  • src/uproot/behaviors/TProfile2D.py: nothing that could be a Content
  • src/uproot/behaviors/TH3.py: nothing that could be a Content
  • src/uproot/behaviors/TGraphAsymmErrors.py: nothing that could be a Content
  • src/uproot/behaviors/TProfile3D.py: nothing that could be a Content
  • src/uproot/behaviors/TH2.py: nothing that could be a Content
  • src/uproot/behaviors/TGraph.py: nothing that could be a Content
  • src/uproot/behaviors/TAxis.py: nothing that could be a Content
  • src/uproot/behaviors/TProfile.py: nothing that could be a Content
  • src/uproot/behaviors/TH1.py: nothing that could be a Content
  • src/uproot/interpretation/library.py:
    • used on array.offsets (Index)
    • used on array.data where array is a NumpyArray (good)

In the results of fgrep -rl 'ensure_numpy' src:

  • src/uproot/writing/identify.py:
    • used in cases that might be Content

np.array is rarely used to cast data (almost all cases are np.asarray) and those that are casting data all look safe to me: I don't think any of them could be Content.

@agoose77
Copy link
Collaborator Author

I think this PR catches all cases, now.

Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

I agree. I just went through the list and I think everything is correct. This will be Uproot 5.0.13.

@jpivarski jpivarski merged commit aff025f into main Oct 12, 2023
@jpivarski jpivarski deleted the agoose77/fix-backport-deprecation-asarray branch October 12, 2023 18:18
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