Thursday, October 9, 2025
HomeLanguagesPython | Numpy np.hermevander() method

Python | Numpy np.hermevander() method

With the help of np.hermevander() method, we can get the pseudo vandermonde matrix at a given degree by using np.hermevander() method.

Syntax : np.hermevander(x, deg)
Return : Return the pseudo vandermonde matrix.

Example #1 :
In this example we can see that by using np.hermevander() method, we are able to get the pseudo vandermonde matrix at a given degree by using this method.




# import numpy and hermevander
import numpy as np
from numpy.polynomial.hermite_e import hermevander
  
x = np.array([0.1, 0.2, 0.3, 0.4, 0.5])
deg = 3
# using np.hermevander() method
gfg = hermevander(x, deg)
  
print(gfg)


Output :

[[ 1. 0.1 -0.99 -0.299]
[ 1. 0.2 -0.96 -0.592]
[ 1. 0.3 -0.91 -0.873]
[ 1. 0.4 -0.84 -1.136]
[ 1. 0.5 -0.75 -1.375]]

Example #2 :




# import numpy and hermevander
import numpy as np
from numpy.polynomial.hermite_e import hermevander
  
x = np.array([1.1, 2.2, 3.3, 4.4, 5.5])
deg = 3
# using np.hermevander() method
gfg = hermevander(x, deg)
  
print(gfg)


Output :

[[ 1. 1.1 0.21 -1.969]
[ 1. 2.2 3.84 4.048]
[ 1. 3.3 9.89 26.037]
[ 1. 4.4 18.36 71.984]
[ 1. 5.5 29.25 149.875]]

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32342 POSTS0 COMMENTS
Milvus
87 POSTS0 COMMENTS
Nango Kala
6712 POSTS0 COMMENTS
Nicole Veronica
11875 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11937 POSTS0 COMMENTS
Shaida Kate Naidoo
6833 POSTS0 COMMENTS
Ted Musemwa
7092 POSTS0 COMMENTS
Thapelo Manthata
6786 POSTS0 COMMENTS
Umr Jansen
6789 POSTS0 COMMENTS