NumPy | Python Methods and Functions

With the method

, we can get the pseudo-Vandermonde matrix for 2D data that has degrees x and y using **np.hermevander2d()** ` np. hermevander2d () `

.

Syntax:`np.hermevander2d (x, y, [x_deg, y_deg])`

Return:Return the pseudo vandermonde matrix of given 2-D data.

** Example # 1: **

B In this example, we can see that with ` np.hermevander2d () `

we can get a pseudo-vander data matrix of two-dimensional data having degree (x, y) using this method.

` `

` ` ` # import numpy and hermevander2d `

` import `

` numpy as np `

` from `

` numpy.polynomial.hermite_e `

` import `

` hermevander2d `

` x `

` = `

` np.array ([`

` 0.1 `

`, `

` 0.2 `

`]) `

` y `

` = `

` np.array ([`

` 2 `

`, `

` 0.2 `

`]) `

` x_deg, y_deg `

` = `

` 2 `

`, `

` 3 `

` # using the np.hermevander2d () method `

` ` ` gfg `

` = `

` hermevander2d (x, y, [x_deg , y_deg]) `

` print `

` (gfg) `

` `

** Output: **

[[1. 2. 3. 2. 0.1 0.2 0.3 0.2

-0.99 -1.98 -2.97 -1.98]

[1. 0.2 -0.96 -0.592 0.2 0.04 -0.192 -0.1184

-0.96 -0.192 0.9216 0.56832]]

** Example No. 2 : **

` ` |

** Output: **

[[1. 10.1 1.01 10.201]

[ one. 20.2 2.02 40.804]

[1. 30.3 3.03 91.809]]

This is the first book on synthetic data for deep learning, and its extensive coverage could make this book the standard benchmark for synthetic data for years to come. The book can also serve as an i...

28/08/2021

This book contains chapters authored by several leading experts in the field of cloud computing. The book is presented in a coordinated and integrated manner starting with the fundamentals and followe...

10/07/2020

Professional-quality code does more than just run without bugs. It’s clean, readable, and easy to maintain. To step up from a capable Python coder to a professional developer, you need to learn indu...

23/09/2020

R for Everyone: Advanced Analytics and Graphics. ...

28/08/2021

X
# Submit new EBook