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

Specify numpy.ndarray shapes #131

Open
redeboer opened this issue Oct 9, 2020 · 2 comments
Open

Specify numpy.ndarray shapes #131

redeboer opened this issue Oct 9, 2020 · 2 comments
Labels
🖱️ DX Improvements to the Developer Experience ❔ Question Discuss this matter in the team

Comments

@redeboer
Copy link
Member

redeboer commented Oct 9, 2020

Specify numpy.ndarray shapes with nptyping.NDArray

@redeboer redeboer added the 🖱️ DX Improvements to the Developer Experience label Oct 9, 2020
@redeboer redeboer self-assigned this Oct 9, 2020
@redeboer redeboer added the ❔ Question Discuss this matter in the team label Oct 14, 2020
@redeboer redeboer removed their assignment Nov 13, 2020
@spflueger
Copy link
Member

With the move to sympy, the lambification process to an evaluable function makes the type hinting impossible at some point.

@redeboer
Copy link
Member Author

redeboer commented Mar 4, 2021

For the computation of the helicity angles (which can't be done in sympy for now), I would still like to see some type hints for the shapes. But afaics, this is not possible with numpy and nptyping is buggy. Alternative would be to wrap, say, an np.array of shape (n, 4) (for a four-momentum tuple and n events) into some LorentzVectorData class.

@redeboer redeboer changed the title Specify numpy.ndarray shapes Specify numpy.ndarray shapes Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖱️ DX Improvements to the Developer Experience ❔ Question Discuss this matter in the team
Projects
Status: No status
Development

No branches or pull requests

2 participants