-
Notifications
You must be signed in to change notification settings - Fork 369
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
findfirst/findlast/nextind/prevind not working for eachcol in v0.21.0 #2229
Comments
This was intentional to make the following work consistently:
This was consider more useful than:
but indeed it has a drawback you have highlighted. I think the solution is to add custom implementations of the functions you mention. Would that work for you? |
(of course breaking these functions was not intentional and I have forgotten to mention this in release notes as there were 102 PRs to annotate so it slipped through) |
Absolutely. I don't think it's a common use case, but nice to have once in a while. |
We should also fix:
CC @nalimilan |
@nalimilan - I have investigated this issue. There is no way to cleanly resolve it. We have the following options:
In summary - I would go for option 1 (stop making |
Maybe we can decide on a more general solution based on how JuliaLang/julia#36073 is resolved? If Related issues: JuliaArrays/AxisArrays.jl#152 (comment), JuliaArrays/AxisArrays.jl#81, invenia/NamedDims.jl#86. |
Sure - we can wait.
I understand that then you would have to provide a custom type that would be returned by |
@nalimilan - given the comment in JuliaLang/julia#36073 I think we should remove @rasmushenningsson - I guess it should be OK with you - right? |
Please have a look at #2291 for the implementation. Actually maybe I even like it more as indexing with multiple columns to |
This code works in v0.20.2,
but errors in v0.21.0 with the error message.
The cause seems to be that the underlying indices are now Symbols and not Ints. I didn't see this in the list of breaking changes so I figured it might be unintentional.
(A note, findall() works, but returns Symbols instead of Ints as before.)
Thanks for the new release and all the hard work!
The text was updated successfully, but these errors were encountered: