Skip to content

Support nested dicts in DataTree.from_dict() and to_dict() #10659

@shoyer

Description

@shoyer

What is your issue?

It would be nice to natively support nested data in from_dict() and to_dict(), rather only than the current "flat" format, e.g., DataTree.from_dict({'a': {'b': {'c': None}}}) instead of DataTree.from_dict({'/a/b/c': None}).

For from_dict(), we could support this by automatically expanding dictionary arguments.

For to_dict(), we could add a new argument nested=True for indicating that a nested dict of names should be returned instead of the current flat structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-DataTreeRelated to the implementation of a DataTree class

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions