-
Notifications
You must be signed in to change notification settings - Fork 11
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
BlockDiagonal
name is misleading
#94
Comments
That's not really how these bugs came about; we used to support only square blocks and when we dropped that restriction we just missed a few functions that needed updating. Supporting non-square blocks was discussed at length in #22, and we conclude that there is a use-case for it and no objections to supporting it. As I say, we missed a few function that needed updating alongside that change (really we should have tested everything on non-square blocks as part of the change), so it's good to get those bugs fixed.
This package's
This is false (or i'm somehow misunderstanding this sentence). This package concerns a subset of block matrices; those that have the form This class of matrix can also be represented using BlockArrays.jl. I think the BlockArrays.jl spelling is
Would these two concrete types actually store the data differently? If not, what would be the benefit of having the different types, if the only differences is an assertion in the constructor? Would there be a benefit to being able to dispatch on "all the blocks are square", e.g. do we have lots of code like Overall, i could be convinced of introducing some kind of distinction between the square-block case and the non-square-block case, but I think there'd have to be a compelling practical benefit |
You've convinced me that changing the public API is unnecessary, as long as we change the docs and add tests.
Ah, I see, have opened an issue: #97
I imagine most people will still expect square blocks but if we have clear docstrings then I think that's sufficient given the scipy precedent.
Ah, sorry, poor wording. I meant to say that this package does not want to support all Block Matrices, which in general have non zero off-diagonal entries. I did not realise though that BlockArrays.jl supports sparse zero offidiagonal blocks.
I've thought about this over the weekend a bit. Indeed the data storage would be done in the same way, and one practical benefit is that we could simplify dispatch on more efficient implementations e.g. for |
closing as cleared up, the type parameter is the only unresolved bit, and can be discussed separately in #107 |
This package allows a
BlockDiagonal
matrix to have non-square blocks on the diagonal, which is in contrast to Block Diagonal Matrix, a term reserved for the subset ofBlockDiagonal
s with square blocks.Note that this package has nothing to do with Block Matrices, which are implemented in BlockArrays.jl.
This identity confusion has led to bugs, e.g. the
diag
implementation which leads to #67 assumes that the blocks are square, and similarly forsvdvals
So we need a name for:
Currently, we have:
BlockDiagonal
Math convention is:
We could have instead:
BlockDiagonal
RectangularBlockDiagonal
AbstractBlockDiagonal
This is a breaking change since it introduces an extra constraint on the existing type (
BlockDiagonal
).The text was updated successfully, but these errors were encountered: