QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: Jahanzaib on August 22, 2023, 01:56

Title: Error
Post by: Jahanzaib on August 22, 2023, 01:56
Dear Expert
I am facing the following error:
ValueError: x and y must have same first dimension, but have shapes (8786,) and (600,)

I solved the like this :  # make list of energies
 energies = numpy.linspace(-2,2,8786)*eV

is this correct?

I have checked the output which shows dos and energies and have same values and I tried all the possible path but still couldn't able to solve it . Anyone help me out
Title: Re: Error
Post by: Anders Blom on August 23, 2023, 07:58
You should just use the energies from the DOS object, i.e.
energies = dos.energies()
If you are trying to zoom in on a certain energy range, use pylab.ylim(-2,2) instead.