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: get coordinate classes to work for numpy #466

Merged
merged 11 commits into from
Jun 7, 2024
Merged

Conversation

Saransh-cpp
Copy link
Member

Description

Fixes #194

Please describe the purpose of this pull request. Reference and link to any relevant issues or pull requests.

Checklist

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't any other open Pull Requests for the required change?
  • Does your submission pass pre-commit? ($ pre-commit run --all-files or $ nox -s lint)
  • Does your submission pass tests? ($ pytest or $ nox -s tests)
  • Does the documentation build with your changes? ($ cd docs; make clean; make html or $ nox -s docs)
  • Does your submission pass the doctests? ($ pytest --doctest-plus src/vector/ or $ nox -s doctests)

Before Merging

  • Summarize the commit messages into a brief review of the Pull request.

Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.85%. Comparing base (85512d0) to head (ee36fca).
Report is 29 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #466      +/-   ##
==========================================
+ Coverage   86.68%   86.85%   +0.16%     
==========================================
  Files          96       96              
  Lines       11836    11919      +83     
==========================================
+ Hits        10260    10352      +92     
+ Misses       1576     1567       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Saransh-cpp Saransh-cpp marked this pull request as ready for review May 16, 2024 19:11
@Saransh-cpp Saransh-cpp marked this pull request as draft May 20, 2024 11:50
@Saransh-cpp Saransh-cpp marked this pull request as ready for review May 22, 2024 11:00
src/vector/backends/numpy.py Show resolved Hide resolved
src/vector/backends/numpy.py Show resolved Hide resolved
src/vector/backends/numpy.py Outdated Show resolved Hide resolved
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 think the reason this wasn't working before is because, in the original implementation, I didn't intend NumPy Vector arrays to be used like this. But it's not unreasonable to expect this behavior, so I'm glad you got it working!

@Saransh-cpp
Copy link
Member Author

Thanks for the review!

@Saransh-cpp Saransh-cpp merged commit 5d806ad into main Jun 7, 2024
23 checks passed
@Saransh-cpp Saransh-cpp deleted the fix-np-getitem branch June 7, 2024 22:05
This pull request was closed.
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.

VectorNumpy3D's azimuthal and longitudinal properties throw an error (similar for VectorNumpy4D)
2 participants