Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

Conversation

@nsmith-
Copy link
Member

@nsmith- nsmith- commented Oct 25, 2019

Not just for speed, but also because earlier it was doing the wrong thing and multplying eta and phi:

a = uproot_methods.TLorentzVectorArray.from_ptetaphim(
    np.full(10, 20.),
    np.linspace(-5, 5, 10),
    np.linspace(-np.pi, np.pi, 10),
    np.full(10, 20.),
)
a * 500

produced phi values in the thousands!

Also, make the __repr__ a bit more clear.

Not just for speed, but also because earlier it was doing
the wrong thing and multplying eta and phi!
@jpivarski
Copy link
Member

I see—you added a specialization to prevent the wrong thing. (Literal multiplication of all elements? Which would be correct for cartesian but wrong for cylindrical coordinates?)

There isn't a test here, but do I have your word that you've tested it? :)

@nsmith-
Copy link
Member Author

nsmith- commented Oct 25, 2019

I'll add some tests

@jpivarski
Copy link
Member

Thank you!

@jpivarski
Copy link
Member

And ping me when you're done so that I don't forget to merge it.

@nsmith-
Copy link
Member Author

nsmith- commented Oct 25, 2019

@jpivarski all good

@jpivarski jpivarski merged commit 84259da into scikit-hep:master Oct 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants