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

axis_keys #250

Open
Tokazama opened this issue Mar 13, 2022 · 7 comments
Open

axis_keys #250

Tokazama opened this issue Mar 13, 2022 · 7 comments

Comments

@Tokazama
Copy link
Member

@rafaqz and @mcabbott, what do you think about having this method defined here to to interfaces together?

@rafaqz
Copy link
Contributor

rafaqz commented Mar 13, 2022

I like the idea, but I'm not sure about overloading the term "keys" as that already means something else for an array.

@Tokazama
Copy link
Member Author

Do you have anything in mind that would more clearly convey what the method should return?

@Tokazama Tokazama mentioned this issue Apr 7, 2022
@rafaqz
Copy link
Contributor

rafaqz commented Apr 7, 2022

Sorry forgot to answer, but no. I've struggled with this too.

@Tokazama
Copy link
Member Author

Tokazama commented Apr 7, 2022

I'm pretty sure what we are all talking about is "keys" of some sort, but the concept of keys hasn't been formalized into a dedicated abstract interface in Julia yet. I think the definition of keys(::AbstractArray) in base is mostly so that functions can work generically with dictionaries and arrays, not necessarily a formalization of that interface. So my opinion is that anything that doesn't break those generic functions is fine. But I'm always open to alternative suggestions.

@mcabbott
Copy link

FWIW, I think calling these "keys" in my package was a mistake, as Base.keys already has a meaning. (And because these are auxiliary info, if you are using them to look up entries often, then you probably want a dictionary not an array.) "Labels" would have been better.

@Tokazama
Copy link
Member Author

IRC, @ChrisRackauckas didn't like "labels" when this was discussed (well over a year ago).

@Tokazama
Copy link
Member Author

I'm assuming this won't get more attention until after people have more time freed up after JuliaCon. I'd be fine if we changed from axes_keys to labels, but I think it is at least as problematic as using the term "keys". For example, if I have a time series recording of subject data I want the time to be the keys and events to be labels/annotations. There can also be multiple layers of conceptually independent labels. That has a place but I'm specifically thinking of what we call the key-value relationship.

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

3 participants