SCM

[#6656] Error taking negation on sparseMatrix w/o `factors` slot, e.g. "dtTMatrix"

Date:
2020-02-05 08:40
Priority:
3
State:
Closed
Submitted by:
Chun Fung (Jackson) Kwok (kcf.jackson)
Assigned to:
Martin Maechler (mmaechler)
Hardware:
None
Product:
None
Operating System:
None
Component:
None
Version:
None
Severity:
normal
Resolution:
Fixed
URL:
Summary:
Error taking negation on sparseMatrix w/o `factors` slot, e.g. "dtTMatrix"

Detailed description
Hi,

I would like to report that there seems to be an unexpected error when one takes negation after taking the Kronecker product of two diagonal matrices. Here is a minimal example:

> - Matrix::Diagonal(2, 3) %x% Matrix::Diagonal(2, 3)
4 x 4 sparse Matrix of class "dtTMatrix"

[1,] -9 . . .
[2,] . -9 . .
[3,] . . -9 .
[4,] . . . -9

> - (Matrix::Diagonal(2, 3) %x% Matrix::Diagonal(2, 3))
Error in (function (cl, name, valueClass) :
‘factors’ is not a slot in class “dtTMatrix”

The example is tested on:
1. Mac OS X, R 3.6.1, Matrix 1.2-18, and
2. Ubuntu 18.04.3 LTS, R 3.6.2, Matrix 1.2-18

Thanks.

Comments:

Message  ↓
Date: 2021-04-21 20:53
Sender: Martin Maechler

Thank you, Chun Fung!

Finally fixed this, svn commit 3385.
Had nothing to do with kronecker but using `-` on a "dtTMatrix".

Attached Files:

Changes

Field Old Value Date By
status_idOpen2021-04-21 20:53mmaechler
close_dateNone2021-04-21 20:53mmaechler
assigned_tonone2021-04-21 20:53mmaechler
summaryError taking negation after kronecker product2021-04-21 20:53mmaechler
SeverityNone2021-04-21 20:53mmaechler
ResolutionNone2021-04-21 20:53mmaechler
Thanks to:
Vienna University of Economics and Business Powered By FusionForge