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

Support reductions over dimensions with non-Number axes #112

Merged
merged 1 commit into from
Aug 23, 2017

Conversation

iamed2
Copy link
Collaborator

@iamed2 iamed2 commented Aug 16, 2017

C = AxisArray(collect(reshape(1:15,3,5)), Axis{:y}([:a,:b,:c]), Axis{:x}(["a","b","c","d","e"]))

# inferrable
sum(C, Axis{:y}())
sum(C, Axis{:y})
sum(C, (Axis{:y}(), Axis{:x}()))

# uninferrable
sum(C, 1)
sum(C, (1,2))
sum(C, (Axis{:y}, Axis{:x}))

The last one is due to typeof((Axis{:y}, Axis{:x})) === Tuple{UnionAll,UnionAll} which Jeff says is Not A Bug.

This should not affect any cases which already worked and definitely does not affect any cases which were tested.

@ajkeller34
Copy link
Collaborator

LGTM. I'll leave this open for a day in case others have comments. I noticed something related that I'll post an issue about though I don't want it to hold up your PR.

@ajkeller34 ajkeller34 merged commit 6be0ff6 into JuliaArrays:master Aug 23, 2017
@iamed2 iamed2 deleted the reduced-oneto branch August 24, 2017 02:16
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