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

cat operations #25

Closed
GordStephen opened this issue Apr 28, 2016 · 3 comments
Closed

cat operations #25

GordStephen opened this issue Apr 28, 2016 · 3 comments

Comments

@GordStephen
Copy link

It would be great to have AxisArray-specific concatenation operations - it would seem fairly straightforward to implement for concatenating on existing dimensions, but operating on higher (not-yet-existing) dimensions might need a bit more consideration regarding how to create the new axes. Or maybe one would just be required to supply an appropriate Axis?

@mbauman
Copy link
Member

mbauman commented Apr 28, 2016

Makes sense. Concatenating existing axes can also check to make sure that the axes are consistent, which I think is very nice feature, too.

I'm not sure how you'd specify a new dimension's axis, but the default constructor simply uses row/col/page/dim_N… as axis names if they're omitted. See _defaultdimname. That could work for now.

@GordStephen
Copy link
Author

Good idea to just use the existing default axis generation. I'll see if I can get some work on this done next week.

Concatenating range-labelled axes might be tricky... should one be able to append labels 1:10 with labels 1:5? It probably makes sense to require concatenated dimensional axes to still be monotonically increasing. But what about appending 1:10 and 21:30? Still disallow? Or replace the axis' val with a 20-element vector (not type-stable)?

@mbauman
Copy link
Member

mbauman commented Apr 29, 2016

We already error on indexing and other constructions that'd create an AxisArray with an un-sorted dimensional axis, so erroring for un-ordered axes here makes sense.

For discontinuities and changing step sizes, I think I'd either always error or always use a PiecewiseIncreasingRange. I don't do much concatenation that extends axes like this in my own work, so I don't have a good sense if the extra flexibility is worth the performance tradeoff.

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

No branches or pull requests

2 participants