Description
Currently, most methods from matrix_polynomial_dense
support empty matrices (i.e. with dimensions 0 x n
, m x 0
, or 0 x 0
). Most, but not all, and why some do and some don't is not very clear for the user, and is not well indicated in the documentation.
This was raised specifically for minimal_relation_basis
in #39516 (comment) . For example:
row_degrees
does not support empty matrices (fails with an error message), it is indirectly stated in the documentation via the examplesleading_matrix
andright_quo_rem
do not support empty matrices (fails with an error message), it is not indicated in the documentationminimal_approximant_basis
andminimal_kernel_basis
do support empty matrices.
The treatment of empty matrices should be more unified among the available methods if possible; but at the very least, the documentation should clearly indicate input restrictions about empty matrices.