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

Convert instances of boolean indexing to ndarrays to pass dask tests in basic module #2090

Merged
merged 1 commit into from
Sep 24, 2021

Conversation

rpmanser
Copy link
Contributor

@rpmanser rpmanser commented Sep 9, 2021

Description Of Changes

This PR fixes bugs discovered in #1935 related to passing dask arrays as arguments to wind_direction, heat_index, and apparent_temperature. dask needs to know the resulting dimensions of the indexed array when performing item assignment, so boolean indexes are converted to ndarray to solve this.

With this PR, it seems safe to say that the basic module now supports dask arrays. Should this be included in the documentation, or do we want to wait until most of the calc module has support for dask arrays?

Checklist

@rpmanser rpmanser requested a review from a team as a code owner September 9, 2021 00:30
@dopplershift
Copy link
Member

Rebasing this on main should get it passing.

@rpmanser rpmanser changed the title Convert instances of boolean indexing to ndarrays to pass dask tests Convert instances of boolean indexing to ndarrays to pass dask tests in basic module Sep 15, 2021
@rpmanser
Copy link
Contributor Author

This should be good to go unless anyone has additional comments or changes. In the last force push I sneaked in the use of np.array instead of np.where in wind_direction, but made no other changes.

@dopplershift dopplershift added Area: Calc Pertains to calculations Type: Bug Something is not working like it should Area: Xarray Pertains to xarray integration labels Sep 24, 2021
@dopplershift dopplershift merged commit 3e08484 into Unidata:main Sep 24, 2021
@github-actions github-actions bot added this to the 1.2.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Calc Pertains to calculations Area: Xarray Pertains to xarray integration Type: Bug Something is not working like it should
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants