Skip to content

Commit

Permalink
Merge pull request #9 from darothen/xarray_0p10p2_fix
Browse files Browse the repository at this point in the history
BUG: Fixing unused imports which have been deprecated from xarray
  • Loading branch information
Daniel Rothenberg committed Mar 19, 2018
2 parents b0f2fcd + 63785c1 commit 147575d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions xbpch/util/cf.py
Expand Up @@ -11,8 +11,6 @@
import datetime

from xarray.core.variable import as_variable, Variable
from xarray.core.indexing import LazilyIndexedArray
from xarray.conventions import MaskedAndScaledArray

#: CTM timestamp definitions
CTM_TIME_UNIT_STR = 'hours since 1985-01-01 00:00:00'
Expand Down Expand Up @@ -185,7 +183,6 @@ def enforce_cf_variable(var, mask_and_scale=True):

# TODO: Once the xr.decode_cf bug is fixed, we won't need to manually
# handle masking/scaling
# data = MaskedAndScaledArray(data, scale_factor=scale, dtype=orig_dtype)
if mask_and_scale:
data = scale*data

Expand All @@ -202,6 +199,4 @@ def enforce_cf_variable(var, mask_and_scale=True):

# TODO: Once the xr.decode_cf bug is fixed, we won't need to manually
# handle masking/scaling
# return Variable(dims, LazilyIndexedArray(data), attrs, encoding=encoding)
return Variable(dims, data, attrs, encoding=encoding)

0 comments on commit 147575d

Please sign in to comment.