Skip to content

Commit 0af1979

Browse files
authored
Add ASV for datatree.from_dict (#9459)
1 parent 9a19d11 commit 0af1979

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

asv_bench/benchmarks/datatree.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import xarray as xr
2+
from xarray.core.datatree import DataTree
3+
4+
5+
class Datatree:
6+
def setup(self):
7+
run1 = DataTree.from_dict({"run1": xr.Dataset({"a": 1})})
8+
self.d = {"run1": run1}
9+
10+
def time_from_dict(self):
11+
DataTree.from_dict(self.d)

0 commit comments

Comments
 (0)