Skip to content

Commit

Permalink
fix cyclic import (python 3.4 test fail)
Browse files Browse the repository at this point in the history
  • Loading branch information
benbovy committed Jun 21, 2017
1 parent c2d11e2 commit fd43ea8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xsimlab/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from .variable.base import (AbstractVariable, Variable, ForeignVariable,
VariableList, VariableGroup)
from .process import Process
from . import xr_accessor
from .utils import AttrMapping
from .formatting import _calculate_col_width, pretty_print, maybe_truncate

Expand Down Expand Up @@ -80,6 +79,8 @@ def _to_xarray_variable(self, key, clock=None):
return xr.Variable(dims, data, attrs=attrs)

def to_dataset(self):
from .xr_accessor import SimlabAccessor

xr_variables = {}

for clock, vars in self.snapshot_clocks_vars.items():
Expand All @@ -96,7 +97,7 @@ def to_dataset(self):
attrs = out_ds.attrs
else:
attrs = out_ds[clock].attrs
attrs.pop(xr_accessor.SimlabAccessor._snapshot_vars_key)
attrs.pop(SimlabAccessor._snapshot_vars_key)

return out_ds

Expand Down

0 comments on commit fd43ea8

Please sign in to comment.