JuliaArrays / BlockDiagonals.jl

Functionality for working efficiently with block diagonal matrices.
MIT License
49 stars 11 forks source link

Test examples of non-square block diagonals #97

Open mzgubic opened 2 years ago

mzgubic commented 2 years ago

This package went from supporting only square blocks to supporting non-square blocks as well. It would be good for tests to have more coverage of this use case to identify/avoid bugs such as https://github.com/invenia/BlockDiagonals.jl/pull/96

mzgubic commented 2 years ago

Hi @Horneffer, thanks for opening a PR.

I think we might want to be a little more systematic about this. Instead of adding a new file with tests for nonsquare matrices we should probably change the current tests such that they run for both the square and non-square matrices. This should be done in a way such that we add new tests they would automatically test the nonsquare blocks as well.

One way to do this would be to define b1, b2, b3 twice (square and non-square) and the rest of the helpers inside runtests.jl, loop over them, and include the test files for each version. See AxisKeys.jl for an example. (AxisKeys only defines a single variable outside).