I am trying to use the "griddata" from "scipy.interpolate". However, the scipy present in scipy is version 0.7 and griddata is implemented 0.9 onwards. Is there a way to upgrade scipy to version 0.9 in sage? I understand that 0.9 is a development version but is there a way to upgrade just scipy to development version?
One thing you could try to install a newer scipy is to download scipy and follow the instructions for installation, but instead of doing "python setup.py ...", do "sage -python setup.py ..." (i.e., instead of calling python, call sage -python, which will use Sage's version of python).
posted Feb 09 '11Jason Grout
3305 ● 7 ● 28 ● 74
There are a couple ways to do this, I think.
posted Jan 29 '11kcrisman
7437 ● 17 ● 76 ● 166
You can try something very dirty that will probably work. Sage's spkg are stored in spkg/standard. I assume you have a tarball for scipy-0.9.
1) go to spkg/standard
2) tar xvfj scipy-0.8
3) cd scipy-0.8
4) rm -rf src/
5) mkdir src
6) untar the scipy-0.9 tarball
7) copy the content of the scipy-0.9 folder in the src folder
8) going back to spkg/standard
9) mv scipy-0.8 scipy-0.9
10) tar cvf scipy-0.9.tar scipy-0.9
11) bzip2 scipy-0.9.tar
12) mv scipy-0.9.tar.bz2 scipy-0.9.spkg
13) cd ../..
14) sage -f scipy-0.9
15) wait for scipy-0.9 to install (cross fingers)
16) start sage (no need for sage -b scipy is a runtime dependency not a build time one)
17) enjoy scipy-0.9 in sage - hopefully
posted Feb 11 '11fbissey
11 ● 1
I had this problem and was able to use "from matplotlib.mlab import griddata". I'm playing with portable python which appears to have:
matplotlib version 0.98.52 scipy version 0.7.0.dev5180 and numpy version 1.2.1
The matplotlib.mlab version of griddata accepts exactly 5 arguments like this: zi = griddata(x,y,z,xi,yi) and uses delauney nearest neighbor triangulation.
Hope that helps!
posted Apr 27 '11flutefreak7
Asked: Jan 28 '11
Seen: 372 times
Last updated: Apr 27 '11
powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.