Hi,
I am trying out pyautodiff and I ran into the following problem:
from autodiff import gradient
@gradient
def f(x):
return x**2
print(f(100))
Prints out:
Which is wrong.
Instead if I call print(f(100.)) -- notice the dot, which makes the argument a float -- I get the correct result:
Am I missing something? Am I doing something wrong?
Thanks for all the good work!
GV
System information:
- Python 3.3.5 |Anaconda 1.9.1 (x86_64)| (default, Sep 2 2014, 13:57:31)
- pyautodiff from the
python3 branch, up to date (HEAD 7973e26)
- Theano 0.7.0
- Numpy 1.9.2
- Meta 0.4.1
Hi,
I am trying out
pyautodiffand I ran into the following problem:Prints out:
Which is wrong.
Instead if I call
print(f(100.))-- notice the dot, which makes the argument a float -- I get the correct result:Am I missing something? Am I doing something wrong?
Thanks for all the good work!
GV
System information:
python3branch, up to date (HEAD 7973e26)