SciPy - Reference



The SciPy is interconnected with NumPy which defines two libraries of Python. These libraries create the foundation of data science and are utilized for analyzing datasets to address real-world problems. SciPy works on the built-in top of NumPy which provide advanced mathematics and scientific calculation.

Here, we provide the SciPy references that explain how to use the libraries. When you look at our list of methods in the table below, you will find details of all references that cover the proper introduction of specific methods by including introduction, syntax, parameters, return type, and various examples. In addition to this, we add the Matplotlib library to SciPy code for plotting the graph.

SciPy Constants Module

This module provide the physical and mathematical constants. Following are the methods of the SciPy Constants

Sr.No. Types & Description
1

nu2lambda()

This method is used to convert the optical frequency into wavelength.

2

lambda2nu()

This method is used to convert the wavelength into optical frequency.

3

convert_temperature()

This method is used to calculate the temperature scale in various form.

4

value()

This method defines the physical_constants dictionary which is indexed by a key.

5

unit()

This method is defined by retrieving the specific unit from the physical constant using the dictionary.

6

precision()

This method is defined by accessing the information of physical constants that includes values and units.

7

find()

This method is defined by an array of elements indices which satisfy the given condition.

SciPy Cluster Module

The cluster module provide the functionality related to cluster algorithm. Following are the methods of the SciPy Cluster

Sr.No. Types & Description
1

fcluster()

This method is a part of hierarchical algorithm which group the data points into a specified number of cluster.

2

fclusterdata()

This method grouped the similar data into cluster.

3

leaders()

This method is used to identify the cluster center.

4

linkage()

This method works on hierarchical cluster which can be used to perform the task of linkage matrix.

5

single()

This method performs the task of single/minimimum/nearest linkage on a condensed matrix.

6

complete()

This Method perform the task of complete linkage(largest point) on a condensed distance matrix.

7

average()

This method is used to perform the task of arithmetic mean on a distance matrix.

8

weighted()

This method depends on other functions which user can perform such as weighted means, weighted sums, and weighted operations.

9

centroid()

This method define an one-dimensional array in which data values are calculated with the help of average weight and these weights itself represent a value.

10

median()

This method is used to find the median value of an array.

11

ward()

This method is a part of agglomerative cluster which minimize the total cluster variance within its control.

12

cophenet()

This method calculates the cophenetic distance between each observation of the hierarchical cluster.

13

from_mlab_linkage()

This method is used to work with clustering algorithm(mlab.linkage) and converts it into a format that can be used for the references of other scipy clustering functions.

14

inconsistent()

This method is used to perform the calculation of inconsistency statistics on a linkage matrix.

15

maxinconsts()

This method is used to calculate the distances between two datasets.

16

maxdists()

This method calculate the pairwise distances between the points from the given set.

17

maxRstat()

This method perform the task of maximum value obtained by a column R for each non-singleton cluster and its children.

18

to_mlab_linkage()

This method is used to convert the clustering output into MATLAB compatible format.

19

dendrogram()

This method determine its functionality by cutting clusters at a particular height.

20

set_link_color_palette()

This method perform the task of matplotlib color codes while representing different level of clusters.

21

DisjointSet()

This method is used to manage the data partition set into a disjoint subsets.

SciPy Misc Module

This scipy.misc module help us to print the images in gray-scale mode. Following are the methods of the SciPy Misc

Sr.No. Types & Description
1

ascent()

This method is used to get the 8-bit grayscale derieved image

2

face()

This method is used to get the images of a racoon.

3

electrocardiogram()

This method is used to represent the electrical activity of the heart.

SciPy Integration Module

The scipy.integrate module provides various methods to perform the operation of numerical integration. Following are the list of methods to understand its functionality −

Sr.No. Types & Description
1

integrate.quad()

This method is used to perform the task of definite integrals.

2

integrate.quad_vec()

This method is used to calculate the definite integrals of vector-value function.

3

integrate.dblquad()

This is used to calculate the double numerical integration.

4

integrate.tplquad()

This method is used to calculate the triple numerical integration.

5

integrate.nquad()

This method is used to find the integration of multiple variable.

6

integrate.fixed_quad()

This method operates the fixed order of gaussian quadrature for numerical integration.

7

integrate.quadrature()

This method is used to calculate the numerical integration.

8

integrate.romberg()

This method is used to calculate the numerical integration.

9

integrate.newton_cotes()

This method is used to return the weights and error coefficient for Newton-Cotes integration.

10

integrate.trapezoid()

This method is used to find the approximate value of integral function using trapezoid rule.

11

integrate.cumulative_trapezoid()

This method is used to calculate the integral from the given set of points using trapezoidal rule.

12

integrate.simpson()

This method is used to approximate the integral of a function using simpson rule.

13

integrate.cumulative_simpson()

This method is used to calculate the coordinates at every pairs

14

integrate.romb()

This method is used to perform the task of numerical or romberg integration.

SciPy Datasets Module

SciPy Datasets module enables you to access and work with datasets used in scientific computation and research. It offers straightforward means of loading and clearing cached datasets for use in a wide range of projects and investigations.

Sr.No. Function & Description
1

scipy.download.all

This method is used to download all available datasets in the SciPy dataset module.

2

scipy.clear.cache

This method is used to clear the cached datasets that have been previously downloaded using the SciPy dataset module.

Advertisements