-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Describe the potential feature
Currently the library does not support complex numbers, causing e.g.
import awkward as ak
import vector
arr = ak.Array(
[{"x": 1, "y": 2, "z": 3 + 3j, "t": 5 + 3j}],
with_name="Vector4D",
behavior=vector.backends.awkward.behavior,
)
arr.tauto fail since np.copysign does not seem to handle complex numbers (see e.g. np.copysign(ak.Array([1, 1j]), ak.Array([1, -1]))).
I ran into this while solving for object kinematics in constrained systems, where the violation of assumptions (e.g. on-shell decay) can result in imaginary contributions to the kinematics. Another example might be math with tachyons. For my use case I can in practice work around this by making all relevant numbers real before hitting any vector codepaths that would otherwise fail.
I am opening this issue to have a place to track the topic and potential interest in vector with complex numbers as I have not seen this discussed previously.
Motivation
No response
Possible Implementation
No response