sage: mat = matrix(ZZ, 0, 0)
sage: mat.det()
1
However, the code (and myself) was expecting this to be 0 as the sum in the definition is vacuous.
Although, in a sense, the 0x0 matrix is its own inverse, so this might be an argument for having it be 1.
Thoughts?
Best,
Travis
Definitely 1 not 0. It's a multiplicative gadget.
John
--
On 2016-03-19, Florent Hivert <Florent...@lri.fr> wrote:
> This was done before categories and there is the following comment:
>
> TODO: must be adapted to category check framework when ready (see trac \#5274).
>
> which has been forgotten so far... This should clearly be moved to the generic
> test-suite for matrix spaces.
I don't see how you could reasonably move that test to the category
framework. After all, tests are performed on parents (here: matrix
spaces) and elements, and you talk here about very special parents
(namely: those with one dimension equal to zero). Hence, the categorial
_test_... method would need to explicitly test whether one dimension is
zero (otherwise the test is skipped), and in addition you need to
explicitly add TestSuite(MatrixSpace(ZZ,0,0).run() somewhere in the docs.
How is that a progress compared to what we have now?