Skip to content
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

Indexing with a different type fails #116

Open
tomhaber opened this issue Oct 2, 2021 · 0 comments
Open

Indexing with a different type fails #116

tomhaber opened this issue Oct 2, 2021 · 0 comments

Comments

@tomhaber
Copy link
Contributor

tomhaber commented Oct 2, 2021

Indexing a NamedArray with a different type than used to create the names dict results in a error.
For example, creating a NamedArray with SubStrings (or any WeakRefString) and indexing with a String

Dict allows indexing with other keys as long as it has a suitable hash and isequal method

tomhaber added a commit to tomhaber/NamedArrays.jl that referenced this issue Oct 2, 2021
Dict allows any type as long as there is an `isequal` and similar `hash` method
I opted to do a `convert` here, just to be on the safe side
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant