Hi,
Try symengine (https://github.com/symengine), which is much faster than
sympy but less functionalities (only basic functions of sympy). It also has
python wrappers (https://github.com/symengine/symengine.py).
Best
在2022年5月23日星期一 UTC+2 16:23:38<Jim Zhang> 写道:
> Hello,
>
> I am new to Sympy. At times, I wish to get an analytical expression in
> terms of certain variables. In the following case, one is a Numpy array (T)
> and the other is a Sympy matrix (X). I know it is not a good idea to
> directly multiply them, so I convert T to a Sympy matrix first. However,
> it would take forever to get the result because of this large-sized matrix.
> Are there any more computationally efficient ways?
>
> Thanks in advance,
>
> Jim
>
>
> import numpy as np
> import sympy as sp
>
> T = np.random.rand(100, 6000)
> x = sp.symbols('x:'+str(6000))
> X = sp.Matrix(x)
> W = sp.Matrix(T)
> V = W * X
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/b0613531-9840-4483-a066-a97dc48bc7edn%40googlegroups.com.