<s>[INST] import sympy as sp

x = sp.symbols('x')
expr = x + 2*sp.sin(x)
f = sp.lambdify(x, expr, "numpy")

import numpy as np
print(f(1.0)) # prints 1.0 + 2*sin(1.0)

print(f(1))   # prints 1 + 2*sin(1) which is a sympy object
             # but I want the result to be numeric,
             # because in my actual code,
             # I'm going to pass this function to scipy's minimize function.

How can I modify my function f to always return a float, 
even when the input is an integer?[/INST]