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

Solidify what KeyedDataset interface #28

Open
rofinn opened this issue Mar 17, 2021 · 2 comments
Open

Solidify what KeyedDataset interface #28

rofinn opened this issue Mar 17, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@rofinn
Copy link
Member

rofinn commented Mar 17, 2021

Related to #25 it's unclear what common Julia operations are applicable to a KeyedDataset (e.g., first(ds), values(ds), etc). Maybe it's worth making this type an AbstractDict with some extra functions?

@rofinn rofinn added enhancement New feature or request help wanted Extra attention is needed labels Mar 17, 2021
@nickrobinson251
Copy link

nickrobinson251 commented Mar 17, 2021

Or perhaps behave similarly to a Dictionaries.jl Dictionary, which doesn't subtype AbstractDict, largely because they "can be manipulated and transformed using a similar interface to Julia's built-in arrays", which i think makes sense for a KeyedDataset e.g. mapping and broadcasting preserves the indices and transforms the corresponding values.

@rofinn
Copy link
Member Author

rofinn commented Mar 17, 2021

Interesting, I don't love that there's a different type call Dictionary with a different show syntax, but I do like that:

  1. setindex! and insert! are distinct with different use-cases.
  2. Most of the AbstractIndices behaviour matches most of our set related operations and queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants