We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
v1.1.1
3.11
MacOS
In [1]: import vector; import numba as nb In [2]: vec = vector.zip({"pt": [1, 2 ,3], "phi": [1, 2, 3], "eta": [1, 2, 3], " ...: mass": [1, 2, 3], "charge": [1, 2, 3]}) In [3]: @nb.njit ...: def return_charge(vec): ...: return vec.charge In [4]: return_charge(vec) # works fine Out[4]: <Array [1, 2, 3] type='3 * int64'> In [5]: @nb.njit ...: def return_charge(vec): ...: return vec[0].charge In [6]: return_charge(vec) # errors out --------------------------------------------------------------------------- TypingError Traceback (most recent call last) <ipython-input-8-74cedf343dae> in <cell line: 0>() ----> 1 return_charge(vec) # errors out /opt/homebrew/lib/python3.11/site-packages/numba/core/dispatcher.py in _compile_for_args(self, *args, **kws) 466 e.patch_message(msg) 467 --> 468 error_rewrite(e, 'typing') 469 except errors.UnsupportedError as e: 470 # Something unsupported is present in the user code, add help info /opt/homebrew/lib/python3.11/site-packages/numba/core/dispatcher.py in error_rewrite(e, issue_type) 407 raise e 408 else: --> 409 raise e.with_traceback(None) 410 411 argtypes = [] TypingError: Failed in nopython mode pipeline (step: nopython frontend) Unknown attribute 'charge' of type MomentumObject4DType(AzimuthalObjectRhoPhi(int64 x 2), LongitudinalObjectEta(int64 x 1), TemporalObjectTau(int64 x 1)) File "<ipython-input-7-37c9d458f596>", line 3: def return_charge(vec): return vec[0].charge ^ During: typing of get attribute at <ipython-input-7-37c9d458f596> (3) File "<ipython-input-7-37c9d458f596>", line 3: def return_charge(vec): return vec[0].charge ^ In [7]: @nb.njit ...: def return_charge(vec): ...: return vec.charge[0] In [8]: return_charge(vec) # works fine Out[8]: 1
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Vector Version
v1.1.1
Python Version
3.11
OS / Environment
MacOS
Describe the bug
Any additional but relevant log output
No response
The text was updated successfully, but these errors were encountered: