I am using scipy 0.17.1
and numpy 1.11.1
.
I am getting an error when trying to use interpolate
, even if the subpackage interpolate should be included in my version (docs)
import numpy as np
import scipy
x = np.linspace(0, 2*np.pi, 1000)
y = np.sin(x) + 0.01*np.random.randn(1, 1000)
y = scipy.interpolate.PchipInterpolator(x, y)
Results in error:
Traceback (most recent call last):
File "C:\Users\flabriol\AppData\Local\Continuum\Anaconda2\lib\site-packages\IPython\core\interactiveshell.py", line 2885, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-110-7dfbae0fdab5>", line 5, in <module>
y = scipy.interpolate.PchipInterpolator(x, y)
AttributeError: 'module' object has no attribute 'interpolate'
Can I use the interpolate
module without upgrading scipy
?