Also take a look at the numbered_symbols function.

On Mon, Dec 23, 2013 at 11:56 AM, Jason Moore <[email protected]> wrote:
> You could use list comprehensions and argument expansion (*):
>
> x = symbols('x1, x2, x3')
> functions = [Function(name) for name in ['f1', 'f2', 'f3]]
> F = [f(*x) for f in functions]
>
>
> Jason
> moorepants.info
> +01 530-601-9791
>
>
> On Mon, Dec 23, 2013 at 11:56 AM, benjamin <[email protected]> wrote:
>>
>> This is example
>>
>> from sympy import Symbol,Function
>>
>> x1=Symbol ('x1')
>> x2=Symbol ('x2')
>> x3=Symbol ('x3')
>>
>> f1=Function ('f1')
>> f2=Function ('f2')
>> f3=Function ('f3')
>>
>> X=[]
>> X.append(x1)
>> X.append(x2)
>> X.append(x3)
>>
>> F=[]
>> F.append(f1(x1,x2,x3))
>> F.append(f2(x1,x2,x3))
>> F.append(f3(x1,x2,x3))
>>
>> is there any smarter way to do it?
>> thank you
>>
>> --
>> 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.
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to