Oscar Benjamin

Results 1316 comments of Oscar Benjamin

I opened #23830 to consider the possibility of using the pypi multipledispatch module.

This guide should be referenced in the solve docstring. It should probably also link to and be linked from the other solving guides.

@bertiewooster @asmeurer can you review this docs guide?

It works for a sympy Matrix but not a numpy array: ```python In [22]: e = MatrixSymbol('e', 3, 3) In [23]: E = Matrix(e) In [24]: T = tensorproduct(E, E)...

The numpy array will sympify to a MutableDenseNDimArray but passing that directly gives an error: ```python In [1]: e = MatrixSymbol('e', 3, 3) In [2]: E = Matrix(e) In [3]:...

This diff makes subs raise rather than swallow the exception: ```diff diff --git a/sympy/core/basic.py b/sympy/core/basic.py index 14640c3..bd3f213 100644 --- a/sympy/core/basic.py +++ b/sympy/core/basic.py @@ -935,21 +935,28 @@ def subs(self, *args, **kwargs):...

> Just so that I am clear, the syntax with a sympy matrix has no bugs to it. So I can use: `res1.subs( {e: sp.Matrix(E_num)} )` Yes, that is fine...

After #23887 the example above will raise an error rather than silently not working ```python >>> T.subs(e, E_num) --------------------------------------------------------------------------- SympifyError Traceback (most recent call last) in 7 E_num = np.array([[1,...

How long did it take to reach this error? I just tried this code and after 5 minutes it's still running and I don't see an error yet. My guess...

Thanks. I wonder if this is due to https://github.com/python/cpython/pull/25403 I can see in the diff there what looks like the source of this exception: https://github.com/python/cpython/blob/c0453a40faaadb43d2e69767af6c9680f8689063/Python/compile.c#L8649-L8658