Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Problem using numpy to obtain the complex conjugate of a matrix

I have the following code:

import numpy as np
A=np.array([[2, 2-9j, -5j], [4-1j, 0, 9+6j], [4j, 6+7j, 6]])
print(A)
print(A.getH())

It doesn’t work. I have checked different webs and followed this webpage (geeksforgeeks), and this other(official numpy documentation) but I still get an error and I don’t know where. Can someone please help me?

The error is 'numpy.ndarray' object has no attribute 'getH'

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

That’s correct, a numpy array doesn’t have a method getH. Your second link actually is the official documentation, and it shows that the method is not called getH. Read the documentation closely!

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading