Skip to content

Optimize reshaping when the shape is unchanged - #2137

Merged
mrocklin merged 1 commit into
dask:masterfrom
jakirkham:opt_ident_reshape
Mar 29, 2017
Merged

mrocklin merged 1 commit into
dask:masterfrom
jakirkham:opt_ident_reshape

Conversation

@jakirkham

Copy link
Copy Markdown
Member

If reshape is called on a Dask Array and the shape isn't changed, there should be no need to perform reshape. So simply return the original array unchanged. Test that the array is unchanged in this case as well.

If `reshape` is called on a Dask Array and the shape isn't changed,
there should be no need to perform reshape. So simply return the
original array unchanged. Test that the array is unchanged in this case
as well.
@mrocklin
mrocklin merged commit 7fb7aab into dask:master Mar 29, 2017
@jakirkham
jakirkham deleted the opt_ident_reshape branch March 30, 2017 02:31
@jakirkham

Copy link
Copy Markdown
Member Author

Are there similar gains in slicing for identity slices as well or have those optimizations already been covered pretty well?

@mrocklin

Copy link
Copy Markdown
Member

I don't recall

@jakirkham

Copy link
Copy Markdown
Member Author

It seems it is optimized in some cases, but not others. Have written up issue ( #2146 ) with some of my findings. There may be more cases to check too.

@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