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

Fix to_iris conversion issues #2111

Merged
merged 5 commits into from
May 14, 2018
Merged

Fix to_iris conversion issues #2111

merged 5 commits into from
May 14, 2018

Conversation

AlexHilson
Copy link
Contributor

@AlexHilson AlexHilson commented May 9, 2018

@@ -101,6 +101,9 @@ def isnull(data):
einsum = _dask_or_eager_func('einsum', array_args=slice(1, None),
requires_dask='0.17.3')

masked_invalid = _dask_or_eager_func('masked_invalid', eager_module=np.ma,
dask_module=dask_array.ma)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this breaks if dask is not installed:

xarray/__init__.py:6: in <module>
    from .core.alignment import align, broadcast, broadcast_arrays
xarray/core/alignment.py:11: in <module>
    from .indexing import get_indexer_nd
xarray/core/indexing.py:11: in <module>
    from . import duck_array_ops, nputils, utils
xarray/core/duck_array_ops.py:105: in <module>
    dask_module=dask_array.ma)
E   AttributeError: 'NoneType' object has no attribute 'ma'

Instead, we need something like dask_module=getattr(dask_array, 'ma', None)

@shoyer
Copy link
Member

shoyer commented May 14, 2018

Would you mind adding a brief note about this bug-fix for whats-new.rst?

@shoyer shoyer merged commit f4ef34f into pydata:master May 14, 2018
@shoyer
Copy link
Member

shoyer commented May 14, 2018

thanks!

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

Successfully merging this pull request may close these issues.

from_iris converts dask array into numpy array
2 participants