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

Incompatibility with xarray 0.10.2 #8

Closed
JiaweiZhuang opened this issue Mar 16, 2018 · 2 comments
Closed

Incompatibility with xarray 0.10.2 #8

JiaweiZhuang opened this issue Mar 16, 2018 · 2 comments

Comments

@JiaweiZhuang
Copy link

JiaweiZhuang commented Mar 16, 2018

xbpch 0.3.0 is not compatible with xarray 0.10.2:

In [1]: import xbpch
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-659176cbe09c> in <module>()
----> 1 import xbpch

~/Research/Computing/miniconda3/envs/geo/lib/python3.6/site-packages/xbpch/__init__.py in <module>()
      5     pass
      6
----> 7 from . bpch import BPCHFile
      8 from . core import open_bpchdataset, open_mfbpchdataset

~/Research/Computing/miniconda3/envs/geo/lib/python3.6/site-packages/xbpch/bpch.py in <module>()
     12
     13 from . uff import FortranFile
---> 14 from . util import cf
     15 from . util.diaginfo import get_diaginfo, get_tracerinfo
     16

~/Research/Computing/miniconda3/envs/geo/lib/python3.6/site-packages/xbpch/util/cf.py in <module>()
     12
     13 from xarray.core.variable import as_variable, Variable
---> 14 from xarray.core.indexing import LazilyIndexedArray
     15 from xarray.conventions import MaskedAndScaledArray
     16

ImportError: cannot import name 'LazilyIndexedArray'

Those import commands no longer work in xarray 0.10.2:

In [2]: from xarray.core.indexing import LazilyIndexedArray
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-247a23d0f2bf> in <module>()
----> 1 from xarray.core.indexing import LazilyIndexedArray

ImportError: cannot import name 'LazilyIndexedArray'

In [3]: from xarray.conventions import MaskedAndScaledArray
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-6f922ed71e58> in <module>()
----> 1 from xarray.conventions import MaskedAndScaledArray

ImportError: cannot import name 'MaskedAndScaledArray'

This is about xarray.core so is not documented in xarray change log

@darothen
Copy link
Owner

Please try darothen/xbpch/#9 and let me know that it works. I tested on all my local data and it was fine.

@darothen
Copy link
Owner

Should be fixed now; included as part of v0.3.3 release and will be available on PyPI and conda-forge shortly.

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

2 participants