Propagate AxisArray copy / view down to taking copies / views of its axes as well #148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my attempt at addressing #147
All the tests appear to pass. I'm new to Julia and wasn't quite sure on the best way implement this, but doing it via Value types seemed efficient and easy. The only issue was that, in order to resolve the following method ambiguity:
I had to duplicate
_new_axes
on line 95 with thecopy
parameter as bothVal{true}
andVal{false}
(whereas I originally just had the argument ascopy::Val
). I couldn't work out another way to get it to compile, but no doubt someone will be able to suggest a better way to avoid this ambiguity without duplicating code.