This is a very disruptive proposition, I know, but hear me out. The reason I'm suggesting it is because higher-order ComponentArrays are
- still a bit buggy
- not widely used
- keeping
Base from doing its job
Still a bit buggy
For as long as I can remember, the doc has stated:
Higher dimensional ComponentArrays can be created too, but it's a little messy at the moment.
Indeed, ComponentMatrix gives rise to a number of issues like
Indexing
Concatenation
Linear algebra operations
Basically, as soon as we touch matrices, the number of necessary overloads grows out of control, and no one has time to play whack-a-mole.
Not widely used
If we take a look at the search
https://github.com/search?q=language%3AJulia+ComponentMatrix&type=code
and exclude forks, we find exactly 4 repos where ComponentMatrix is used:
In addition, @vpuri3 and @dingraha have recently submitted PRs related to ComponentMatrix, so perhaps they use it too.
Keeping Base from doing its job
In several of the bugs outlined above, @mcabbott and I think that just removing the higher-order ComponentArrays would allow functions from Base (like stack or hcat) to take over and do the right thing. But that is still an untested hypothesis.
Upsides of ComponentMatrix
On the other hand it is true that this format has good things going for it. Most notably, the ability to index block by block, as demonstrated in the ODE example
This is a very disruptive proposition, I know, but hear me out. The reason I'm suggesting it is because higher-order
ComponentArrays areBasefrom doing its jobStill a bit buggy
For as long as I can remember, the doc has stated:
Indeed,
ComponentMatrixgives rise to a number of issues likeIndexing
ComponentMatrixwithFlatAxiscomponents #248Concatenation
reduce(hcat, ...method #113Linear algebra operations
invanddiagetc fromLinearAlgebra? #187 (comment)Basically, as soon as we touch matrices, the number of necessary overloads grows out of control, and no one has time to play whack-a-mole.
Not widely used
If we take a look at the search
https://github.com/search?q=language%3AJulia+ComponentMatrix&type=code
and exclude forks, we find exactly 4 repos where
ComponentMatrixis used:In addition, @vpuri3 and @dingraha have recently submitted PRs related to
ComponentMatrix, so perhaps they use it too.Keeping
Basefrom doing its jobIn several of the bugs outlined above, @mcabbott and I think that just removing the higher-order
ComponentArrays would allow functions fromBase(likestackorhcat) to take over and do the right thing. But that is still an untested hypothesis.Upsides of
ComponentMatrixOn the other hand it is true that this format has good things going for it. Most notably, the ability to index block by block, as demonstrated in the ODE example