You could take a look at Theano, a project similar to SymPy but devoted to
numeric computation on arrays.  The sophistication of the simplifications
is much lower but arrays are supported to a greater extent.


On Fri, Sep 6, 2013 at 12:13 AM, david <[email protected]> wrote:

> @Stefan
> You are right. The therms of the expressions have to be combined as much
> as possible. This is more a pre evaluation as a simplification. Some
> variables are changing during the repeating calculation of the expressions
> afterwards. This variables are numpy arrays or normal floats and therfore
> must be preserved in the expression. I have looked in many python libraries
> but sympy simplification did what I want. Unfortunatly the syntax dont
> supports the array style of variables and symbols.
> The task you suggest with lambdify has to follow after the simplification.
> Because even with lambdify you have to carry out much more operations than
> necessary.
>
> Am Freitag, 6. September 2013 01:49:31 UTC+2 schrieb Aaron Meurer:
>>
>> As I suggested on the StackOverflow question, you might try using the
>> matrix expressions.
>>
>> Aaron Meurer
>>
>>
>> On Thu, Sep 5, 2013 at 2:53 PM, Stefan Krastanov <[email protected]>wrote:
>>
>>> Is there a reason not to use Symbols? From your explanations I do not
>>> see one. If your issue is how to couple the result to something like numpy,
>>> checkout `lambdify`.
>>>
>>>
>>> On 5 September 2013 15:54, david <[email protected]> wrote:
>>>
>>>> For better explanation I have done the simplification in MatCad where
>>>> unassigned variables are seen as symbols in sympy.
>>>>
>>>>
>>>> <https://lh4.googleusercontent.com/-uq82CF7JYZw/UijhDNbjPvI/AAAAAAAAAAM/bPAnd8PQSpI/s1600/simplify+with++arrays.tiff>
>>>>
>>>>
>>>> Am Donnerstag, 5. September 2013 15:19:14 UTC+2 schrieb david:
>>>>
>>>>> I have explored the sympy features and i was very impressed with both
>>>>> the amount of features and the ease of testing with the doc and the 
>>>>> coupled
>>>>> Live Shell.
>>>>> I want to write a programm that simplifies expressions as much as
>>>>> possible to minimize calculation time because they will later be 
>>>>> numericaly
>>>>> evaluated very often.
>>>>> The most features I need work very well. But with arrays I have a
>>>>> problem.
>>>>> I need to define an array object as an symbol, so that the following
>>>>> is possible:
>>>>>
>>>>> simplify(2.0*2.0*t[0])
>>>>> is simplified to:
>>>>> 4.0*t[0]
>>>>>
>>>>> and:
>>>>> idx = 2
>>>>> simplify(2.0*2.0*t[idx])
>>>>> shold be simplified to:
>>>>> 4.0*t[2]
>>>>>
>>>>> Is there any way to do this?
>>>>>
>>>>> 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 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