-
Notifications
You must be signed in to change notification settings - Fork 89
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
fix: extend TypeTracerArray with __eq__, __ne__, and __array_ufunc__. #2021
fix: extend TypeTracerArray with __eq__, __ne__, and __array_ufunc__. #2021
Conversation
This is definitely needed - the question for me is whether I'll be done with #1849 before this is 'needed' (it's already needed, but that's hard to define!) Ths likelihood is that I'll be replacing this code in the near future. If you think it's needed now, merge! (I'll review anyway) |
"Why not make TypeTracerArray inherit from NDArrayOperatorsMixin?"
At step 3, I stopped looking into it. The refactor made the TypeTracerArray code a little nicer (dropped 6 very short methods), but not a lot, and it seems to be getting into some deep waters that I don't have time for right now. I.e. the cost-benefit is not good enough to keep following this line. |
Yes, it's needed in the short term, and it's fine if it gets refactored. The awkward/src/awkward/operations/ak_where.py Line 111 in 9ab248c
( |
This is ready to merge (I see your informal assent, above). The test failures are unrelated, but they need to be fixed. As soon as tests pass, we'll merge. |
Codecov Report
Additional details and impacted files
|
dask-contrib/dask-awkward#133 (comment) happened because TypeTracerArray didn't have an
__eq__
method. It was easy to add, along with__ne__
.In addressing this issue, I first added an
__array_ufunc__
(NEP-13) because I thought that's what the issue was and I was surprised that it didn't have one. I'm still surprised it doesn't have one. We could implement all of the__eq__
,__ne__
,__gt__
,__ge__
,__lt__
,__le__
methods in one swoop by making TypeTracerArray inherit fromak._connect.numpy.NDArrayOperatorsMixin
.What do you think, @agoose77? Actually, I've pretty much talked myself into it. The next commit will do that. It's git, everything's reversible, of course!