Skip to content

Check and compare shapes in assert_eq - #2101

Merged
mrocklin merged 3 commits into
dask:masterfrom
jakirkham:assert_eq_shape
Mar 30, 2017
Merged

mrocklin merged 3 commits into
dask:masterfrom
jakirkham:assert_eq_shape

Conversation

@jakirkham

@jakirkham jakirkham commented Mar 20, 2017 •

Copy link
Copy Markdown
Member

Add some checks for shapes in assert_eq. Particularly compare shapes before computing results and compare shapes between dask arrays and computed results.

Seems that shape comparison only occurred on the result of computing the
Dask array. In our case, we found the Dask array itself had the wrong
shape, but the computed result had the right shape. To fix this we add a
comparison of the shapes before computation occurs. This happens in
addition to the existing test comparing the shapes afterwards.
jakirkham and others added 2 commits March 20, 2017 16:43
As an extra check of the shape, make sure the shape hasn't changed
between the Dask and the computed result. Have seen this occur in some
cases as well while working on other code. So this should show some of
these issues and help avoid them cropping up in the future.
@mrocklin

Copy link
Copy Markdown
Member

Merging this soon if there are no further comments

@jakirkham

Copy link
Copy Markdown
Member Author

LGTM

@mrocklin
mrocklin merged commit 47c6846 into dask:master Mar 30, 2017
@jakirkham
jakirkham deleted the assert_eq_shape branch March 30, 2017 13:35
@sinhrks sinhrks added this to the 0.14.2 milestone May 11, 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.

3 participants