symbolic icon indicating copy to clipboard operation
symbolic copied to clipboard

Array_not_Matrix: uniop_bool_helper may not work with Array

Open cbm755 opened this issue 3 years ago • 2 comments

this code:

              'if x if not None and x.is_Matrix:'
              '    return x.applyfunc(sf, *pp)'

Will need fixes something like #1224 for the is_Matrix part. But its also possible the .applyfunc bit will need to go through @alexvong243f's make_matrix_or_array.

I should do some experiments in SymPy: what is supposed to happen if you start with a Matrix and then .applyfunc your way to non-Expr entries?

cbm755 avatar Sep 02 '22 20:09 cbm755

Related upstream question: https://github.com/sympy/sympy/issues/24008

cbm755 avatar Sep 02 '22 20:09 cbm755

Based on upstream comments, we should assume that .applyfunc would return a TypeError or similar if it produces something that cannot go back into a matrix.

I guess we catch that and try again with a loop and an Array? Might easiest to leave this until we can get that error from SymPy...

cbm755 avatar Sep 04 '22 03:09 cbm755