-
Notifications
You must be signed in to change notification settings - Fork 30
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
Better support for operations on option[Vector[...]]
#283
Comments
This is one of the motivations for the |
(self note) maybe add an option to |
We talked about this on Slack; having a general array-cast mechanism as described in scikit-hep/awkward#1807 (comment) would allow users and library designers to fix the type after the fact. Looking at use-cases like this helps, though, because it specifies how flexible the type casting would have to be. For instance, given an array like
and desiring a type
it would have to add the
I might need to start with a list of transformations that the algorithm needs to have. |
Is there a fix to this yet? I just stumbled across this issue when I attempted to concatenate awkward arrays of Momentum4D Elements where some entries are None:
The resulting array has lost the Nones but also the Momentum4D reference and only contains the 4 kinematic branches:
Calling |
Actually, calling |
Vector Version
0.10.0
Python Version
3.10.7
OS / Environment
Linux (Ubuntu 22.04)
Conda-provisioned Python
Describe the bug
Outer options become inner-options after operations on vectors:
Steps to Reproduce
Wrap a vector in an option type, and then operate on it e.g. with
cross
.Expected Results
The option should survive outside the record.
Observed Results
The option moves inside the record.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: