sympy/sympy — pull request #1920 by gilbertgede (2013-03-22 07:14:54+00:00)
Title: Lambdify uses Dummy symbols

Within lambdify, lambdastr specifically, all over the provided args are replaced with Dummy symbols within the expr to be evaluated. This allows for substitution of things with unfriendly names, such as AppliedUndef's (e.g., x(t)).

Before this failed:
>>> t = symbols('t')
>>> x = Function('x')
>>> x = x(t)
>>> lambdify(x, 2*x)
Now the above works.

Within lambdastr, the default behavior is not to dummify everything; it is a kwarg option. When lambdstr is called by lambdify though, dummify is set to True. The justification for this is that if lambdastr is called directly by a user, they might want to observe the output, in which case all Dummy symbols would be confusing; if lambdify calls lambdastr, they won't be able to see the output, and the lambdastr readability doesn't matter, making the increased range of input arguments worth it.

In addition, translations from ImmutableMatrix -> matrix needed to be added, as calling sympify on a Matrix results in an ImmutableMatrix.

A few tests were added to ensure that the new lambdify functionality works.