Skip to content

Add atop(concatenate=False) keyword argument#1609

Merged
mrocklin merged 1 commit intodask:masterfrom
mrocklin:atop-concatenate
Oct 4, 2016
Merged

Add atop(concatenate=False) keyword argument#1609
mrocklin merged 1 commit intodask:masterfrom
mrocklin:atop-concatenate

Conversation

@mrocklin
Copy link
Member

@mrocklin mrocklin commented Oct 4, 2016

This allows atop to pre-concatenate arrays before sending to the user
defined function.

Previously we would send an iterable of chunks to the user-defined-function. This allows us to optionally pre-concatenate those arrays ahead of time, simplifying the effort on the user's side.

@mrocklin
Copy link
Member Author

mrocklin commented Oct 4, 2016

cc @shoyer

function should expect an iterator of blocks on any array that holds that
index.
function should expect an iterable of blocks on any array that holds that
index. To receieve an array concatenated along the dummy dimension pass
Copy link
Member

Choose a reason for hiding this comment

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

Instead:

To receive arrays concatenated along contracted dimensions instead pass concatenate=True

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@shoyer
Copy link
Member

shoyer commented Oct 4, 2016

Yes, I found the nested lists of arrays passed previously quite unintuitive, and also a little misleading, because it suggested that the arrays could be processed in a streaming fashion (when in reality they're loaded into memory all at once).

This allows atop to pre-concatenate arrays before sending to the user
defined function.
@mrocklin
Copy link
Member Author

mrocklin commented Oct 4, 2016

Yes, I found the nested lists of arrays passed previously quite unintuitive, and also a little misleading, because it suggested that the arrays could be processed in a streaming fashion (when in reality they're loaded into memory all at once).

Historically we used to use iterators and stream things through. This is no longer the case though.

@mrocklin
Copy link
Member Author

mrocklin commented Oct 4, 2016

Merging.

@mrocklin mrocklin merged commit 3862b4d into dask:master Oct 4, 2016
@mrocklin mrocklin deleted the atop-concatenate branch October 4, 2016 15:37
@shoyer
Copy link
Member

shoyer commented Oct 4, 2016

Historically we used to use iterators and stream things through. This is no longer the case though.

OK, that could explain part of my confusion...

@TomAugspurger TomAugspurger mentioned this pull request Oct 6, 2016
@sinhrks sinhrks added this to the 0.11.1 milestone Oct 11, 2016
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