scipy
scipy¶
scipy
is a collection of tools that are commonly encountered in scientific environments. The implementations are generally robust and reliable. The documentation varies in quality but is generally helpful.
It is impossible to cover all the aspects of the entire package because it includes modules to cover an enormous range of functionality:
cluster
: clustering algorithms (data analysis)constants
: physical / mathematical constantsfftpack
: fourier transformsintegrate
: numerical integration routinesinterpolate
: various data interpolation routineslinalg
: linear algebra routines (matrices etc)ndimage
: N dimensional image manipulation and resizing (also array manipulations)odr
: Orthogonal distance regressionoptimize
: Optimization / root findingsignal
: Signal processingsparse
: Sparse matrix packagesspatial
: Spatial data / triangulation / Voronoi diagramsspecial
: Special (mathematical) functionsstats
: Statistics routines
Here we will just skim some of the available sub-modules and go through some of the examples provided.
## importing scipy does very little (mostly the numpy namespace)
import numpy as np
import scipy
## to use the modules import each one separately
from scipy import constants as constants
print (constants.electron_mass)
print ()
print (constants.find("electron mass"))
print ()
print (constants.value("electron mass")," ", constants.unit("electron mass"))
## Note, this is actually the numpy array as well
help(scipy.ndarray)