-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add indexes methods #329
Add indexes methods #329
Conversation
Thanks, but I don't think that's right. Can you develop what's the problem you get with Turing.jl? |
Fair enough; good point.
I'm afraid that I don't understand this sentence. You mean to show the exact error here or to see whether the problem can be fixed at Turing.jl? |
I guess both, but seeing the error would probably help. |
On second thought, isn't this PR a more specific implementation of the existing design? Even though numeric indexing isn't supposed to be used, it is implemented:
When I use CategoricalArrays for
After a method with a specialized type on CategoricalArrays for
|
I was trying to use CategoricalArrays with Turing.jl. Surprisingly, it worked after I added some CategoricalArrays specialized type signatures for
Base.checkindex
andBase.to_index
. According to the docstrings of both, these extensions are allowed, see?Base.checkindex
and?Base.to_index
.With this PR, I suggest to add these specialized type signatures.
By the way, this PR is slightly related to #296, which is about a specialization for InvertedIndices.