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

Make DataModel.to_flat_dict a utility function too? #131

Open
pllim opened this issue Mar 1, 2023 · 0 comments
Open

Make DataModel.to_flat_dict a utility function too? #131

pllim opened this issue Mar 1, 2023 · 0 comments

Comments

@pllim
Copy link
Contributor

pllim commented Mar 1, 2023

def to_flat_dict(self, include_arrays=True):

I can really use that in https://github.com/spacetelescope/jdaviz/blob/ab9351417e6d20f88db82037954e1977c5a01592/jdaviz/configs/default/plugins/metadata_viewer/metadata_viewer.py#L92 but that usage takes in arbitrary nested dictionary, not DataModel object.

Would be nice if you turn this algorithm into a utility function outside of DataModel class so we don't have a copy of the same stuff in Jdaviz.

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