On 30/05/2020 15:02, Giuseppe G. A. Celano wrote:
|
Entercode here...
|
I am trying to perform a dot multiplication between a numpy array
(64,1000) and a sympy matrix (1000, 100) containing only variables,
but the computation never ends. How to do that?
--
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]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/402c5bd3-b503-4a45-9ea4-6754a4e49a23%40googlegroups.com
<https://groups.google.com/d/msgid/sympy/402c5bd3-b503-4a45-9ea4-6754a4e49a23%40googlegroups.com?utm_medium=email&utm_source=footer>.
That calculation is going to create matrix with 6,400 elements, each of
which will be a summation of 1000 terms (at least before any possible
simplification, and assuming you mean variables without a numeric
value). Bearing in mind that symbolic expressions take quite a lot of
memory, that lot is going to take up a fair bit of memory but I'd guess
it would be OK in 64 bits (you don't say if your Python installation is
64bits as opposed to 32 bits).
However, calculating something that size is certainly going to be
challenging, and may need to run over night. In addition there is the
problem that the program may be choking trying to print the result.
My advice would be to start with a much scaled down example, and then
gradually scale it up to see what breaks.
If you want to do something immediately to use the matrix without
printing the 64 x 100 matrix of algebraic expressions (!!) that might be
best.
Good luck!
David
--
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/c1317888-6e61-5e22-2111-65021d783a07%40dbailey.co.uk.