Dear Sympy developers and users,
Could anyone help me with the following problem:
substitute a, b, c by arrays in expression f = a*b*c. For example, I get
"ValueError: The truth value of an array with more than one element is
ambiguous" if running:
import sympy
import numpy
sympy.var('a,b,c')
f = a*b*c
array1 = numpy.random.randint(1,3,3)
array2 = numpy.random.randint(1,3,3)
array3 = numpy.random.randint(1,3,3)
f.subs([[a, array1], [b, array2], [c, array3]])
Best Regards
Ronghai Wu
--
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 http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/89d85fa0-8151-40da-ab0c-6d6f6d34a66e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.