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

2D Lazy masks fail when indexed in 1D #392

Merged
merged 2 commits into from
May 31, 2017

Conversation

keflavich
Copy link
Contributor

This sort of masking + indexing:

med = cube.median(axis=0)
mask = cube > med

mcube = cube.with_mask(mask)

spec = mcube[:,1,1]

will result in a broadcast failure:

ValueError: operands could not be broadcast together with shapes (4,) (2,2)

because the comparison_value is being indexed with the same view as the data.

@keflavich
Copy link
Contributor Author

Huh, no, it's not. This is a bug, but not for the reasons I imagined.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 74.937% when pulling 31ce4ff on keflavich:issue392 into b0f2fe3 on radio-astro-tools:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 74.937% when pulling 31ce4ff on keflavich:issue392 into b0f2fe3 on radio-astro-tools:master.

@keflavich keflavich merged commit 1f2c9cc into radio-astro-tools:master May 31, 2017
@keflavich keflavich deleted the issue392 branch May 31, 2017 22:34
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.

2 participants