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

Avoid division by zero in rechunk #1902

Merged
merged 1 commit into from Jan 11, 2017
Merged

Conversation

mrocklin
Copy link
Member

cc @pitrou does this look ok to you?

def test_rechunk_warning(capsys):
N = 20
x = da.random.normal(size=(N, N, 100), chunks=(1, N, 100))
x = x.rechunk((N, 1, 100))
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps:

with warnings.catch_warnings(record=True) as w:
    x = x.rechunk((N, 1, 100))
assert not w

https://docs.python.org/2/library/warnings.html#testing-warnings

@mrocklin
Copy link
Member Author

mrocklin commented Jan 10, 2017 via email

@mrocklin mrocklin merged commit 33d61ec into dask:master Jan 11, 2017
@mrocklin mrocklin deleted the rechunk-div-zero branch January 11, 2017 01:01
@sinhrks sinhrks added this to the 0.14.0 milestone Mar 4, 2017
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.

None yet

3 participants