
20140929
, 04:32

Posts: 1,206 
Thanked: 3,603 times 
Joined on May 2011
@ Brazil

#2


20141012
, 13:44

Posts: 1,206 
Thanked: 3,603 times 
Joined on May 2011
@ Brazil

#3

import time t1=time.time() import numpy as np from scipy import fft from scipy import fftpack t2=time.time() print "NumPy&SciPy import : %f s" % (t2t1) d = np.linspace(0, 1e3, 1e6) t3=time.time() print "NumPy linspace 10**6 : %f s" % (t3t2) fft(d) t4=time.time(); print "SciPy FFT 10**6 : %f s" % (t4t3) fftpack.fft(d) t5=time.time(); print "SciPy FFTPack 10**6 : %f s" % (t5t4)
import time t1=time.time() from scipy.integrate import tplquad t2=time.time() print "SciPy tplquad import : %f s" % (t2t1) result = tplquad(lambda x, y, z: (x*y*z)**(x+y+z), 0, 1, lambda y: 0, lambda y: 1, lambda y, z: 0, lambda y, z: 1) t3=time.time(); print "SciPy tplquad (x*y*z)**(x+y+z) : %f s" % (t3t2) print result
Tags 
calculations, python, scientific, scipy 
Thread Tools  

SciPy is a set of open source scientific and numeric tools for Python. It currently supports special functions, integration, ordinary differential equation (ODE) solvers, gradient optimization, genetic algorithms, parallel programming tools, an expressiontoC++ compiler for fast execution, and others.
Version history :
 SciPy 0.14.0 (03/05/2014) ported to MeeGo 1.2 Harmattan in 28/09/2014.
SciPy 0.14.0 Harmattan is based on Ubuntu 14.10 version and SciPy 0.14.0 source code, but without Python 3 support, no documentation package, adapted dependencies to MeeGo Harmattan, etc.
SciPy has 2 repositories options, so it can be :
 easily installed by using Warehouse / OpenRepos.net. Install Warehouse (OpenRepos.net client) for MeeGo Harmattan, then open Warehouse, search for "SciPy", enable the repository and install;
 installed by using my Harmattan repository.
Warehouse showing SciPy 0.14.0 available to install :
SciPy 0.14.0 takes 45MB, but it also installs pythondecorator, NumPy >= 1.9.0, libgfortran3, libblas3gf and liblapack3gf, total of approx. 70MB after installation.
It is strongly suggested to also install IPython for MeeGo Harmattan, so the interactive use of SciPy becomes a lot easier. With the new IPython 0.13.2 Harmattan, there are 3 interfaces : IPython terminal, IPython Notebook and IPython Qt console.
Time to load SciPy on Nokia N9 : 0.40.6 s (v0.14.0) by using 'from scipy import *' or 'import scipy'.
SciPy documentation is in the official SciPy site with SciPy Reference Guide, both online as well as in PDF and other formats. SciPy help in interactive mode is available by typing "help(scipy)" (after an "import scipy").
More Python packages are listed in the Python Harmattan Wiki. See also OpenRepos.net.
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit  calculating mathematical integrals, derivatives and limits. SymPy  Computer Algebra System.
MatPlotLib  2D & 3D plots in Python. IPython  Python interactive shell.
 My blog about mobile & scientific computing 
2 Jolla 1, Jolla C, Jolla Tablet. 2 Nokia N9. Nexus 4 with Sailfish. Nokia N900 & N810.
Last edited by rcolistete; 20141011 at 18:32. Reason: Added screenshot of SciPy 0.14.0 in Warehouse