Friday, October 17, 2025
HomeLanguagesPython | Numpy np.hermvander() method

Python | Numpy np.hermvander() method

With the help of np.hermvander() method, we can get the pseudo vandermonde matrix from hermite series of given degree by using np.hermvander() method.

Syntax : np.hermvander(x, deg)
Return : Return the pseudo vandermonde matrix of given degree.

Example #1 :
In this example we can see that by using np.hermvander() method, we are able to get the pseudo vandermonde matrix of hermite series by using this method.




# import numpy and hermvander
import numpy as np
from numpy.polynomial.hermite import hermvander
  
x = np.array([1, 2, 3, 5, 7, 11])
deg = 2
  
# using np.hermvander() method
gfg = hermvander(x, deg)
  
print(gfg)


Output :

[[ 1. 2. 2.]
[ 1. 4. 14.]
[ 1. 6. 34.]
[ 1. 10. 98.]
[ 1. 14. 194.]
[ 1. 22. 482.]]

Example #2 :




# import numpy and hermvander
import numpy as np
from numpy.polynomial.hermite import hermvander
  
x = np.array([5, 10, -10, -5])
deg = 3
  
# using np.hermvander() method
gfg = hermvander(x, deg)
  
print(gfg)


Output :

[[ 1.00e+00 1.00e+01 9.80e+01 9.40e+02]
[ 1.00e+00 2.00e+01 3.98e+02 7.88e+03]
[ 1.00e+00 -2.00e+01 3.98e+02 -7.88e+03]
[ 1.00e+00 -1.00e+01 9.80e+01 -9.40e+02]]

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

Most Popular

Dominic
32361 POSTS0 COMMENTS
Milvus
88 POSTS0 COMMENTS
Nango Kala
6728 POSTS0 COMMENTS
Nicole Veronica
11892 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11954 POSTS0 COMMENTS
Shaida Kate Naidoo
6852 POSTS0 COMMENTS
Ted Musemwa
7113 POSTS0 COMMENTS
Thapelo Manthata
6805 POSTS0 COMMENTS
Umr Jansen
6801 POSTS0 COMMENTS