Professional Documents
Culture Documents
Prepared By:
Jenish Patel
Jesal Zala
Kirtan Shah
Sanyukta Gautam
SciPy
SciPy is an Open Source Python-based library, which is used in mathematics, scientific computing,
Engineering, and technical computing.
● SciPy contains varieties of sub packages which help to solve the most common issue related to
Scientific Computation.
● Scipy is easy to use and understand.
● It can operate on an array of NumPy library.
Subpackage Description
SciPy Organization
cluster Clustering algorithms
https://docs.scipy.org/doc/scipy/reference/tutorial/basic.html
https://docs.scipy.org/doc/scipy/reference/tutorial/index.html
https://hal.inria.fr/hal-01206546/file/ScipyLectures-simple.pdf
Spatial data structures and algorithms (scipy.spatial)
scipy.spatial can compute triangulations, Voronoi diagrams, and convex hulls of a set of points, by leveraging the Qhull library.
Convex hulls
Convex hull is the smallest convex object containing all points in a given point set.
>>> plt.plot(points[:,0],points[:,1],'o')
... plt.plot(points[simplex,0],points[simplex,1],'k-')
>>> plt.show()
Voronoi diagrams
>>> from scipy.spatial import KDTree
... [2,0],[2,1],[2,2]])
>>> tree.query([0.1,0.1])
(0.14142135623730953, 0)
>>>y=np.linspace(-0.5,2.5,33)
>>> xx,yy = np.meshgrid(x,y) #np.meshgrid(*xi, **kwargs) , Return coordinate matrices from coordinate vectors,Make N-D coordinate arrays for vectorized evaluations of, N-D scalar/vector fields over N-D grids,
given one-dimensional coordinate arrays x1, x2,..., xn.
>>> xy = np.c_[xx.ravel(),yy.ravel()]
>> import matplotlib.pyplot as plt
>>> plt.pcolor(x,y,tree.query(xy)[1].reshape(33,31))
>>> plt.plot(points[:,0],points[:,1],'ko')
>>> plt.show()