h is Symbol('h') (and given how sympy cache works - yes it is global).
I was unsure whether I should use this or force the user to pass at least 
one parameter.
Maybe I should let it default to 1 instead of Symbol('h')? I'm starting to 
lean towards that 
the more I think of it..

On Monday, 7 April 2014 19:04:38 UTC+2, [email protected] wrote:
>
>
> On 07.04.2014 19:34, Björn Dahlgren wrote: 
> > After reading Aaron's recommendation about looking for unanswered sympy 
> > questions at stackoverflow I stumbled upon: 
> > 
> > 
> http://stackoverflow.com/questions/18701290/derivatives-discretization-with-sympy
>  
> > 
> > I implemented a solution for this and it is available as a WIP PR over 
> here: 
> > https://github.com/sympy/sympy/pull/7382 
> > 
> > I would love to hear your feedback on this. 
> > 
>
> Hi, 
>  From the stackoverflow question here is your example: 
>
>  > Here is an example: 
>  >>> from sympy import symbols, Function 
>  >>> x, h = symbols('x h') 
>  >>> f = Function('f') 
>  >>> print(f(x).diff(x).as_finite_diff()) 
> -f(-h + x)/(2*h) + f(h + x)/(2*h) 
>
>
> Is it means that you use "h" symbol from the global namespace? 
>
>
>
>
> -- 
> Alexey Gudchenko 
>
>
> > Best regards 
> > /Björn 
> > 
>
>
>
>

-- 
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/8bd86f8c-7a04-4171-89e4-cc43d69fa9eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to