Skip to content

Array reductions - #725

Merged
mrocklin merged 7 commits into
blaze:masterfrom
mrocklin:array-reductions
Oct 10, 2014
Merged

Array reductions#725
mrocklin merged 7 commits into
blaze:masterfrom
mrocklin:array-reductions

Conversation

@mrocklin

@mrocklin mrocklin commented Oct 9, 2014

Copy link
Copy Markdown
Member

Add axis keyword to Reduction expression.

In [1]: from blaze import *

In [2]: x = Symbol('x', '5 * 3 * float32')

In [3]: x.sum().dshape
Out[3]: dshape("float32")

In [4]: x.sum(axis=0).dshape
Out[4]: dshape("3 * float32")

In [5]: x.sum(axis=1).dshape
Out[5]: dshape("5 * float32")

@mrocklin

Copy link
Copy Markdown
Member Author

@mwiebe can I ask you to review this?

@mrocklin mrocklin mentioned this pull request Oct 10, 2014
@mwiebe

mwiebe commented Oct 10, 2014

Copy link
Copy Markdown
Contributor

Taking a look

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's also the tuple of axes case, which would need a 3 dim array to test effectively. ``a.sum(axis=(0,2)) for example.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed

@mwiebe

mwiebe commented Oct 10, 2014

Copy link
Copy Markdown
Contributor

Looks good to me.

@mrocklin
mrocklin merged commit 105ee39 into blaze:master Oct 10, 2014
@mrocklin
mrocklin deleted the array-reductions branch October 10, 2014 17:51
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