Open cbm755 opened 2 years ago
@alexvong1995 here's a half-baked idea for Issue #1124: roughly when we have non-Expr
to be put in a Matrix
, we instead make an Array
. This will be important for future SymPy as non-Expr in Matrix is deprecated.
@alexvong1995 What do you think of this? Basically in a few places (probably not that many) we return Array instead of Matrix. Specifically we return Matrix greedily whenever everything is a Expr, else Array.
(It will need fixes upstream but I'm less worried about that.)
Maybe you can try doing this in the mat_rclist_
and other helper functions, just to get a feel for the idea.
I think the the test failure is partly due to dbout
being defined in inst/private/python_header.py
(for non-Pythonic IPC) but not in inst/private/python_ipc_native.m
(for Pythonic IPC).
I'm not sure what to do about it. It seems there's more code in inst/private/python_header.py
than in inst/private/python_ipc_native.m
.
that could be true: I haven't looked at pythonic much recently. You can always comment out "dbout()" (it is just debugging). With Pythonic you can probably just print()
instead.
Anyway, I think even concentrating on system
-based, this idea is not complete.
@alexvong1995 you can rebase and force push this on top of main (if you like).
I think what we should do next is to make @sym/horzcat
and @sym/vertcat
Array-compatible. I haven't done any tests yet but I suspect all those [t t; f f]
where t
is sym(true)
and f
is sym(false)
are causing many test failures.
------- Original Message ------- On Monday, August 29th, 2022 at 12:04 AM, Colin B. Macdonald @.***> wrote:
@alexvong1995 you can rebase and force push this on top of main (if you like).
rebased onto main and force pushed as a7c44c0d78bd6be66b6795ed339751657b1c3a3d
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
I think there was a way to turn an warning into an exception in Python. That might be useful when debugging here... like SymPyDeprecationWarning
becomes an exception.
------- Original Message ------- On Friday, September 2nd, 2022 at 4:57 PM, Colin B. Macdonald @.***> wrote:
I think there was a way to turn an warning into an exception in Python. That might be useful when debugging here... like
SymPyDeprecationWarning
becomes an exception.
from sympy import Matrix from sympy.utilities.exceptions import SymPyDeprecationWarning import warnings
warnings.filterwarnings("error", category=SymPyDeprecationWarning) Matrix([[True]])
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
It has mostly the same semantics as Matrix but can contain more general things. There might be some issues about different shapes of empties though... WIP on a fix for #1052 and #1055.