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

feat: add parameters #9

Merged
merged 10 commits into from
Aug 11, 2023
Merged

feat: add parameters #9

merged 10 commits into from
Aug 11, 2023

Conversation

jpivarski
Copy link
Member

No description provided.

@jpivarski
Copy link
Member Author

Although parameters in Awkward Array (Python) are a mapping from arbitrary names to arbitrary JSON-serializable data,

  • they're usually empty
  • when not empty, it's usually just __array__, which can take a short list of possible values: "string", "bytestring", "char", "byte", "categorical", "sorted_map"
  • when it's not __array__, it's either __list__, __record__, or __doc__, which can only take string values
  • or it's something else; a general case (extremely rare).

So our struct Parameters will handle the common cases efficiently, and the uncommon cases... maybe an ImmutableDict{Any}.

src/AwkwardArray.jl Outdated Show resolved Hide resolved
@jpivarski jpivarski marked this pull request as ready for review August 10, 2023 23:07
@jpivarski jpivarski merged commit f514ab9 into main Aug 11, 2023
2 checks passed
@jpivarski jpivarski deleted the jpivarski/add-parameters branch August 11, 2023 00:28
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

Successfully merging this pull request may close these issues.

Array nodes must support parameters, which implies a strict dependence on JSON.jl.
2 participants