Skip to content

DenseMatrix functionality improvements #17

Open
@harakas

Description

@harakas

After a slight brush with DenseMatrix, here's some stuff I found not working that well:

  • DenseMatrix is missing __sub__, currently can do A+B, but not A-B.
    DenseMatrix does not support left side multiple with a Basic, that is Symbol('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, like A[1].
    Add vector specific methods like dot, norm, cross (I suppose this should be done on the symengine/C++ side actually first).

Activity

harakas

harakas commented on Nov 8, 2015

@harakas
ContributorAuthor
  • It would also be nice to have sympy style initialisation working, like A = DenseMatrix([[1, 2, 3], [4, 5, 6]]).
    This should also allow one to create single column vectors as v = DenseMatrix([1, 2, 3]).
    Consider abandoning the entire C++ style initialization.
    Currently one can do A+5, which results in 5 being added to every cell. I think this is something that should not be allowed. There is add_scalar already, no need to muddle the algebra in this way.
certik

certik commented on Nov 9, 2015

@certik
Contributor

@harakas thanks a lot for your feedback. We should definitely improve the Python interface.

modified the milestone: 0.3.0 on May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @certik@isuruf@harakas

        Issue actions

          DenseMatrix functionality improvements · Issue #17 · symengine/symengine.py