Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Assigning a new node to an existing tree #85

Closed
dcherian opened this issue May 4, 2022 · 4 comments
Closed

Assigning a new node to an existing tree #85

dcherian opened this issue May 4, 2022 · 4 comments
Labels
usage question User questions about usage

Comments

@dcherian
Copy link

dcherian commented May 4, 2022

I feel like I'm missing something but this is the best I could come up with

a05["natre"] = datatree.DataTree.from_dict({"natre": xarray_dataset})["natre"]

Is this right?

@TomNicholas
Copy link
Member

You should be able to just do

a05["natre"] = DataTree(xarray_dataset)

(Also are you using the packaged version or main? Because I changed alot just a couple of days ago that I still need to release, see #76)

@TomNicholas TomNicholas added the usage question User questions about usage label May 4, 2022
@dcherian
Copy link
Author

dcherian commented May 4, 2022

I'm using main, because I didn't read the docs :). I only look for badges in READMEs nowadays haha.

@TomNicholas
Copy link
Member

Okay well let me know if that works!

@dcherian
Copy link
Author

That works thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
usage question User questions about usage
Projects
None yet
Development

No branches or pull requests

2 participants