python - Evaluation of sympy.function containing a NumPy function -


my problem following code doesn't evaluate function f

class f(sympy.function):     @staticmethod     def _imp_(x):         return numpy.sin(x)  # shows f(0.1)          # return sympy.sin(x)  # shows 0.0998334166468282  print f(0.1) 

numerically when use inside _imp_ function numpy procedures. works when use sympy only. wrong @ here?

there nothing wrong.

the precision due floating point numbers.

check here , here ,where can set precision.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -