Unfortunately, the way SymPy currently works, it doesn't actually
store variables. It reexecutes previous inputs. The workaround here,
for SymPy Live, is to copy the result of str(A) and paste it as A, so
that it evaluates to the same thing. This won't be an issue in a
normal Python session.

This is something that we would like to fix, by the way, if anyone is
interested in working on SymPy Live.

Aaron Meurer

On Mon, Dec 12, 2016 at 5:31 PM, Raúl Romero <[email protected]> wrote:
> I have seen that when I input:
>>> A = randMatrix(3,3)         (for example)
> and after that I call A
>>> A
> A changes continuously.
> How can I get a random matrix (or number) that get fixed for using it from
> then on?
> Thanks.
>
> --
> 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 post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/06301465-2572-40a9-868a-d2f5bcb19972%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2BbQhkD%2B2Jw%2BL_ViUUqbQOH7pku7uDEV6Ok7c2dp5pAsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to