Using the np.hermcompanion()
method, we can get the companion matrix from the Hermite series using np.hermcompanion ()
.
Syntax:
np.hermcompanion (series)
Return: Return the companion matrix.
Example # 1:
In this example we see that with np.hermcompanion ()
we can get the companion matrix from the Hermite row using this method.

Output:
[[0. 0.70710678 0. 0.04330127]
[0.70710678 0. 1. 0.07144345]
[0. 1. 0. 1.06144556]
[0. 0 . 1.22474487 0.45]]
Example # 2:
# numpy and hermcompanion imports
import
numpy as np
from
numpy.polynomial.hermite
import
hermcompanion
series
=
np.array ([
1
,
2
,
3
,
4
,
5
])
# using the np.hermcompanion () method
gfg
=
herm companion (series)
print
(gfg)
Output:
[[0. 0.70710678 0. 0.01443376]
[0.70710678 0. 1. 0.04082483]
[0. 1. 0. 1.10227038]
[0. 0. 1.22474487 0.4]]
Books for developers
INTRODUCTION TO NUMERICAL PROGRAMMING
Taking into account the development of modern programming, especially the emerging programming languages that reflect modern practice, Numerical Programming: A Practical Guide for Scientists and...
08/08/2021
The Python Workshop
A Practical, NoNonsense Introduction to Python Development.
You already know you want to learn Python, and a smarter way to learn Python 3 is to learn by doing. The Python Workshop focuses on buil...
23/09/2020
HandsOn Machine Learning
HandsOn Machine Learning with ScikitLearn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems PDF, 2nd Edition.
This book assumes you know next to nothing about m...
22/08/2021
Big Data and the Internet of Things
The genesis of this book began in 2012. Hadoop was being explored in mainstream organizations, and we believed that information architecture was about to be transformed. For many years, business intel...
10/07/2020
Get Solution for free from DataCamp guru
X
Submit new EBook