{"id":8184,"date":"2021-01-29T19:12:01","date_gmt":"2021-01-29T13:42:01","guid":{"rendered":"https:\/\/www.h2kinfosys.com\/blog\/?p=8184"},"modified":"2021-01-30T16:46:47","modified_gmt":"2021-01-30T11:16:47","slug":"scipy-in-python","status":"publish","type":"post","link":"https:\/\/www.h2kinfosys.com\/blog\/scipy-in-python\/","title":{"rendered":"SciPy in Python: How to use SciPy for Scientific Computations"},"content":{"rendered":"\n<p>SciPy is a popular library built on top of Numpy extensions with a mixture of functions and mathematical algorithms, that solves scientific, mathematical, and engineering problems. It uses a high-level Python command that visualizes and manipulates data. One important use of SciPy is that it transforms Python sessions into an environment that is efficient for data processing and system prototyping.<\/p>\n\n\n\n<p>SciPy has a myriad of functions that can be called to do different mathematical and scientific computations. It cannot be used without the knowledge of NumPy because it operates on dimensional arrays of the NumPy library. SciPy is preferred to NumPy not only because it is an extension of <a href=\"https:\/\/www.h2kinfosys.com\/blog\/getting-started-with-numpy\/\" class=\"rank-math-link\">NumPy<\/a>, but also because most recent data science features are present in SciPy rather than NumPy.<\/p>\n\n\n\n<p>Let\u2019s begin by listing out some of these functions or sub-packages. They include:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>constants: This is used for physical and mathematical constants.<\/li><li>integrate: This is used to solve Ordinary differential equations (ODE) and Integration problems.<\/li><li>cluster: This is used to cluster algorithms.<\/li><li>fftpack: This is used for fast Fourier transform routines.<\/li><li>ndimage: This is used for N-dimensional image processing.<\/li><li>io: This is used for input and output operations.<\/li><li>odr: This is used for orthogonal distance regression.<\/li><li>linalg: This is used for linear regression analysis.<\/li><li>spatial: This is used for spatial data structures and algorithms.<\/li><li>sparse: This is used for sparse matrices and associated routines.<\/li><li>interpolate: This is used for interpolating and smoothing splines.<\/li><li>stats: This is used for statistical distributions and functions.<\/li><li>special: This is used for special functions.<\/li><\/ol>\n\n\n\n<p>By the end of this tutorial, you will learn how to use scipy to do the most common mathematical and scientific computations using some of the above functions\/sub-packages. We begin by installing scipy into your machine.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Installing SciPy on your Machine<\/strong><\/h2>\n\n\n\n<p>SciPy can be installed in Windows, Linux, Mac.<\/p>\n\n\n\n<p>For Windows, we use pip.<\/p>\n\n\n\n<p><code>Python3 -m pip install --user numpy scipy\u00a0<\/code><\/p>\n\n\n\n<p>For Linux,<\/p>\n\n\n\n<p><code>sudo apt-get install\u00a0 python-scipy python-numpy<\/code><\/p>\n\n\n\n<p>For Mac,<\/p>\n\n\n\n<p><code>sudo port install py35-scipy py35-numpy<\/code><\/p>\n\n\n\n<p>NB: If you have Jupyter Notebook installed on your PC (and by extension Anaconda), you would not need to perform the above steps as scipy comes pre-installed alongside Anaconda.<\/p>\n\n\n\n<p>Next, we will discuss some of the features of SciPy in python used for scientific computation.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>File Input\/Output package<\/strong><\/li><\/ol>\n\n\n\n<p>This package has a variety of functions working with different file formats. Some of these file formats are Wave, Matrix market, TXT, binary format, CSV, and Matlab. One of the regularly used file formats is Matlab and we shall look at an example provided below.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#import necessary libraries\nimport numpy as np\nfrom scipy import io as sio\n#Then, we create a 3x3 dimensional one's array\narray = np.ones((3,3))\n#store the array in a file using the savemat method\nsio.savemat('sample.mat',{'array': array})\n#get the data from the stored file using the loadmat method\ndata = sio.loadmat('sample.mat', struct_as_record=True)\n#print the output\ndata['array']<\/pre>\n\n\n\n<p>OUTPUT<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>array(&#91;&#91;1., 1., 1.],\n       &#91;1., 1., 1.],\n       &#91;1., 1., 1.]])\n<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li><strong>Special Function Package<\/strong><\/li><\/ol>\n\n\n\n<p>As earlier said, scipy.special is that package that contains various functions in mathematics. These functions are exponential, cubic root, lambert, kelvin, parabolic cylinder, Bessel, gamma, permutation and combinations, log sum amongst others. For a further description in the Python console; you can use the following command<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#First, we import the scipy function\nimport scipy as scipy\nhelp(scipy.special)<\/pre>\n\n\n\n<p>OUTPUT<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Help on package scipy.special in scipy:\n\nNAME\n&nbsp;&nbsp;&nbsp;&nbsp;scipy.special\n\nDESCRIPTION\n&nbsp;&nbsp;&nbsp;&nbsp;========================================\n&nbsp;&nbsp;&nbsp;&nbsp;Special functions (:mod:`scipy.special`)\n&nbsp;&nbsp;&nbsp;&nbsp;========================================\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;.. module:: scipy.special\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;Nearly all of the functions below are universal functions and follow broadcasting and automatic array-looping rules. Exceptions are noted.\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;.. seealso::\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`scipy.special.cython_special` -- Typed Cython versions of special functions\n<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li><strong>Cubic Root Function<\/strong><\/li><\/ol>\n\n\n\n<p>This function finds the cube root of numbers. The syntax is written on the Python console as scipy.special.cbrt(x). For example,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#First, we import the scipy cubic root function\nfrom scipy.special import cbrt\n#Then, we say for example that we want to find the cube root of 125, 27, and 100 using the cbrt() function\ncuberoot = cbrt([125, 27, 1000])\n&nbsp;\n#Then, we print the result\nprint('The cuberoot of 125, 27 and 1000 are: ', end='')\nprint(cuberoot, end=' ')\nprint('respectively')<\/pre>\n\n\n\n<p>OUTPUT<\/p>\n\n\n\n<p><code>The cuberoot of 125, 27 and 1000 are: [ 5.&nbsp; 3. 10.] respectively<\/code><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li><strong>Exponential Function<\/strong><\/li><\/ol>\n\n\n\n<p>This function computes the 10**x of an element. For example<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">from scipy.special import exp10\n#Then, we find the exp10 function and then give it a value\n&nbsp;\nexponent= exp10(7)\n#Then, we print the result\n&nbsp;\nprint('The 10th exponent of 7 is: ', end='')\nprint(int(exponent))<\/pre>\n\n\n\n<p>OUTPUT<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>The 10th exponent of 7 is: 10000000\n<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li><strong>Permutations and Combinations<\/strong><\/li><\/ol>\n\n\n\n<p>For combination, the function is scipy.special.comb(N,k). For example,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#First, we import the SciPy library with the combination package\nfrom scipy.special import comb\n&nbsp;\n#Them, we find the combinations of 6 and 3 using comb(N,k)\ncombination_result = comb(6,3, exact = False, repetition = True)\n#Then, we print the output\nprint('6C3 = ', end='')\nprint (combination_result)<\/pre>\n\n\n\n<p>OUTPUT<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>6C3 = 56.0<\/code><\/pre>\n\n\n\n<p>For Permutation<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#First, we import the SciPy library with the permutation package\nfrom scipy.special import perm\n&nbsp;\n#Them, we find the permutation of 6 and 3 using comb(N,k)\npermutation_result = perm(6,3, exact = True)\n#Then, we print the output\nprint('6P3 = ', end='')\nprint(permutation_result)<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>OUTPUT\n6P3 = 120\n<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\"><li><strong>Linear Algebra with SciPy<\/strong><\/li><\/ol>\n\n\n\n<p>It implements both the BLAS and ATLAS LAPACK libraries but it performs faster than both of them. For example, to calculate the determinant of a 2-dimensional matrix.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#First, we import the SciPy library with linear algebra package\nfrom scipy import linalg\n#Also, we import numpy library\nimport numpy as np\n#Then, we define the 2x2 matrix\nsquare_matrix = np.array([ [4,6], [4,8]])\n#Then, we pass the values to the det() function to find the determinant of the matrix\nlinalg.det(square_matrix)\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">OUTPUT\n7.999999999999998\n<\/pre>\n\n\n\n<p>Also, for the Inverse matrix; the syntax is scipy.linalg.inv(). For example<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#First, we import the SciPy library with linear algebra package\nfrom scipy import linalg\n#Also, we import numpy library\nimport numpy as np\n#Then, we define the 2x2 matrix\nsquare_matrix = np.array([ [4,6], [4,8]])\n#Then, we pass the values to the inv() function to find the inverse of the matrix\nlinalg.inv(square_matrix)\n<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>OUTPUT\narray(&#91;&#91; 1.  , -0.75],\n       &#91;-0.5 ,  0.5 ]])\n<\/code><\/pre>\n\n\n\n<p>For Eigenvalues and Eigenvectors which is the most common problem to solve using linear algebra. The syntax is scipy.linalg.eig(). For example,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#import the SciPy library with linear algebra package\nfrom scipy import linalg\n#Also, we import numpy library\nimport numpy as np\n# define the 2 by 2 matrix\narray = np.array([ [4,6], [4,8]])\n#Then, we pass the values to the function to find the eigenvectors and eigenvalues of the matrix\neigen_value, eigen_vector = linalg.eig(array)\n#Then, we get the eigenvalues\nprint('The eigenvalues are: ')\nprint (eigen_value)\nprint()\n#Also, we get the eigenvectors\nprint('The eigenvectors are: ')\nprint (eigen_vector)\n<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>OUTPUT\nThe eigenvalues are: \n&#91; 0.70849738+0.j 11.29150262+0.j]\n\nThe eigenvectors are: \n&#91;&#91;-0.8767397  -0.6354064 ]\n &#91; 0.48096517 -0.7721779 ]]\n<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"7\"><li><strong>Discrete Fourier Transform DFT<\/strong><\/li><\/ol>\n\n\n\n<p>This is a technique used in mathematics to convert spatial data to frequency data. The algorithm used for computing DFT is called the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Fast_Fourier_transform\" class=\"rank-math-link\" rel=\"nofollow noopener\" target=\"_blank\">Fast Fourier Transform<\/a> FFT. FFT is used for multidimensional arrays. For example, we use a wave with a periodic function.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#Import the necessary libraries including matplotlib\n%matplotlib inline\nfrom matplotlib import pyplot as plt\nimport numpy as np&nbsp;\n&nbsp;\n#Then, we assume a Frequency in terms of Hertz\nfrequency&nbsp; =10\n#Also, we assume a Sample rate\nfrequency_sample = 50\ntime = np.linspace(0, 10, 120, endpoint = False )\namplitude = np.sin(frequency_sample&nbsp; * 2 * np.pi * time)\nplt.plot(time, amplitude)\nplt.xlabel ('Time (s)')\nplt.ylabel ('Signal Amplitude')\nplt.show()\n<\/pre>\n\n\n\n<p>OUTPUT<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/sbpZshNUfY2Bc7FFSXd3KswTOZ8-yNgZwWAq0Gxga1qlL2N-mPQYgKwA2DXIQ7RYxnzJ50cIhcNnk8vZ3to5Psdt8jo_xEFvWZZFq1mBNW6BxaMF7n0GDHQfJezKTjLkBaE72BA\" alt=\"\" title=\"\"><\/figure>\n\n\n\n<p>From this, the frequency is 10 Hz and the period is 1\/10 seconds. With this wave, we can apply DFT.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">from scipy import fftpack\n&nbsp;\nA = fftpack.fft(amplitude)\nfrequency = fftpack.fftfreq(len(amplitude)) * frequency_sample\n&nbsp;\nplt.stem(frequency, np.abs(A))\nplt.xlabel('Frequency (Hz)')\nplt.ylabel('Frequency Spectrum Magnitude')\nplt.show()\n<\/pre>\n\n\n\n<p>OUTPUT<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/jVKzBeSzwGvXN2gpMX7z3aeFc3N2uG7VlsZcRRRr-0iNa0B6HpRykCgGiHooCXchqci5tIADUrWsvTLkeiOSXjRVJS96HAk0xryiNEqXPM7DVZtw8TYpJpzcSha-TtPeSaUpsiQ\" alt=\"\" title=\"\"><\/figure>\n\n\n\n<p>From the output above, the result is a one-dimensional array, and also the input where there are complex values is zero except for two points. We use the DFT to visualize the magnitude of the signal.<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"8\"><li><strong>Optimization and fit in SciPy<\/strong><\/li><\/ol>\n\n\n\n<p>The syntax is scipy.optimize. This provides a meaningful algorithm that is used to minimize curve fittings, multidimensional or scalar, and roof fitting. For example, we look at Scalar function,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#import necessary libraries\nimport matplotlib.pyplot as plt\nfrom scipy import optimize\nimport numpy as np\n&nbsp;\n#define a scalar function to be minimized\ndef function(a):\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return &nbsp; a*5 + 2 * np.cos(a)\nplt.plot(a, function(a))\nplt.show()\nprint('The optimized function is: ')\nprint('------------------------------------')\n#use BFGS algorithm for optimization\noptimize.fmin_bfgs(function, 0)<\/pre>\n\n\n\n<p>OUTPUT<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/BwB1_1IgE5vDLLXGPr6-5iFe5sJDLZYgZzyD_6WLC5GV-9SnWziSGczcb48v-EJDUqaqBqpgjRxxOz0d2wgVJH-2Pe-DTqb3-cJl7I31cuyHsEdHFkOXv48tYKzZ4ky0BdrJpfg\" alt=\"\" title=\"\"><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">The optimized function is:&nbsp;\n------------------------------------\nOptimization terminated successfully.\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Current function value: -581537857.204429\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Iterations: 2\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Function evaluations: 51\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gradient evaluations: 17\n\narray([-1.16307572e+08])\n<\/pre>\n\n\n\n<p>The optimization is done with the example above with the help of the gradient descent algorithm taken from the initial point.<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"9\"><li><strong>Nelder-Mead Algorithm<\/strong><\/li><\/ol>\n\n\n\n<p>It provides the most direct form of minimization for a fair behaved function. It is not used for gradient evaluations because it takes longer. For example,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#First, we import the necessary libraries\nimport numpy as np\nfrom scipy.optimize import minimize\n#Then, we define the scalar function\ndef scaler_function(x):&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;return 2*(1 + x[0])**3\n&nbsp;\n#minimize the scalar function&nbsp;&nbsp;\noptimize.minimize(scaler_function, [1, -1], method=\"Nelder-Mead\")<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>OUTPUT\nfinal_simplex: (array(&#91;&#91;-5.88348348e+43, -2.93385718e+43],\n       &#91;-3.48931950e+43, -1.73998365e+43],\n       &#91;-2.06941187e+43, -1.03193268e+43]]), array(&#91;-4.07318008e+131, -8.49673760e+130, -1.77243698e+130]))\n           fun: -4.073180080259595e+131\n       message: 'Maximum number of function evaluations has been exceeded.'\n          nfev: 401\n           nit: 204\n        status: 1\n       success: False\n             x: array(&#91;-5.88348348e+43, -2.93385718e+43])\n<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"10\"><li><strong>Image Processing with SciPy<\/strong><\/li><\/ol>\n\n\n\n<p>The syntax is scipy.ndimage. The n in ndimage stands for n dimensional image. It is a submodule of SciPy used mainly in image associated operations. These image processing can provide geometric transformation, image segmentation, features extraction and classification. A package called MISC Package contains prebuilt images used in manipulating images. For example,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#import required libraries including the misc package\nfrom scipy import misc\nfrom matplotlib import pyplot as plt\nimport numpy as np\n#Then, we get ascent image of panda from misc package\npanda = misc.ascent()\n#Then, we show the image of face\nplt.imshow(panda);<\/pre>\n\n\n\n<p>OUTPUT<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/iR9Rzll-_Rf7pClu1dsq-GjW-Co-4SUV9CEEJIEAiSBIWZV753oU0jfpMUoUB-IT12du424TgDol4HAfATDSUodP8vt25URxmNOI4c_JS1rnu87rgFWE-uq3OwX4Y0ZuAQkwt4M\" alt=\"\" title=\"\"><\/figure>\n\n\n\n<p>To flip down the image, we input to the Python console,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#To flip Down using scipy misc.face image&nbsp;&nbsp;\nflip_down = np.flipud(misc.ascent())\nplt.imshow(flip_down)\nplt.show()\n<\/pre>\n\n\n\n<p>OUTPUT<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/ldi25qVJhORm1b_0ToQYbWYtJI6QOyt_ZDYLcOYRDfEB7dn_M21GUFxEewCX_48pzsOR784_TXh8eUvSH1l_ZMxPNCbpSpHcuw8hg_7d3FDgLRy6UWfWFk9jur_Q9hmBBQSZIIo\" alt=\"\" title=\"\"><\/figure>\n\n\n\n<p>To rotate images using SciPy,,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#import the necessary libraries\nfrom scipy import ndimage, misc\nfrom matplotlib import pyplot as plt\nimage = misc.ascent()\n#rotation function of scipy for image \u2013 image rotated 9 degree\nrotate_image = ndimage.rotate(image, 9)\nplt.imshow(rotate_image)\nplt.show()\n<\/pre>\n\n\n\n<p>OUTPUT<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/p06zLWTWLBCCNHFGD8-5H8tLIlFD3OBfyMyV9iqQrGhDt_EkikWLr6DwWJ_1mwFpcSpAO5BN9SV1aEIia3RO7_NpZFviWQkPEKz2taxUhbm1MEXSf03_0IIkI91i2Xzfew17gns\" alt=\"\" title=\"\"><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"11\"><li><strong>Integration with SciPy- Numerical Integration<\/strong><\/li><\/ol>\n\n\n\n<p>The syntax is scipy.integrate which consists of single integration, double, multiple, Romberg quadrate, Simpson\u2019s, and Trapezoidal rule. Let&#8217;s say we wish to integrate 15&#215;3<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">OUTPUT\nThe result is: (-156.0, 1.7319479184152442e-12)\n<\/pre>\n\n\n\n<p>The first value is the integration while the second value is the estimated error is integral since it is a numerical computation. As seen, the error value is substantially low.<\/p>\n\n\n\n<p>CONCLUSION<\/p>\n\n\n\n<p>In this tutorial, we have introduced all that there is to know under the concept of SciPy including the various sub-features of SciPy and how to apply all of them. If you have any questions, feel free to leave them in the comment section and I\u2019d do my best to answer them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SciPy is a popular library built on top of Numpy extensions with a mixture of functions and mathematical algorithms, that solves scientific, mathematical, and engineering problems. It uses a high-level Python command that visualizes and manipulates data. One important use of SciPy is that it transforms Python sessions into an environment that is efficient for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8205,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[342],"tags":[],"class_list":["post-8184","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-tutorials"],"_links":{"self":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/8184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/comments?post=8184"}],"version-history":[{"count":0,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/8184\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media\/8205"}],"wp:attachment":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media?parent=8184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/categories?post=8184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/tags?post=8184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}