Open
Description
After a slight brush with DenseMatrix, here's some stuff I found not working that well:
- DenseMatrix is missing
__sub__
, currently can doA+B
, but notA-B
.DenseMatrix does not support left side multiple with a Basic, that isSymbol('x')*A
fails. Add__rmul__
or modify Basic?Adding and multiplying of DenseMatrix objects of incompatible size should result in Python errors/exceptions, not crashes.Indexing of a single column or row matrix should work with a single index, likeA[1]
.Add vector specific methods like dot, norm, cross (I suppose this should be done on the symengine/C++ side actually first).
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
harakas commentedon Nov 8, 2015
A = DenseMatrix([[1, 2, 3], [4, 5, 6]])
.v = DenseMatrix([1, 2, 3])
.A+5
, which results in 5 being added to every cell. I think this is something that should not be allowed. There isadd_scalar
already, no need to muddle the algebra in this way.certik commentedon Nov 9, 2015
@harakas thanks a lot for your feedback. We should definitely improve the Python interface.