gnu-octave / symbolic

A Symbolic Package for Octave using SymPy
https://octave.sourceforge.io/symbolic/
GNU General Public License v3.0
151 stars 36 forks source link

common helper python function for Array/Matrix return #1211

Closed cbm755 closed 2 years ago

cbm755 commented 2 years ago

@alexvong243f, after our discussion, I think you are right: we should have some shared code for this Array versus Matrix stuff:

if all(isinstance(elt, Expr)'
          '           for elt in itertools.chain.from_iterable(MM))):'
          '    M = Matrix(MM)'
          'else:'
          '    M = Array(MM)'

I think a helper python function in python_header is a good way to do this.

alexvong243f commented 2 years ago

Fixed in b618e5fdd0bb1080d913d965ed4040e6f1f6bb6a