Author Topic: Error  (Read 2335 times)

0 Members and 1 Guest are viewing this topic.

Offline Jahanzaib

  • Heavy QuantumATK user
  • ***
  • Posts: 94
  • Country: gb
  • Reputation: 3
    • View Profile
Error
« 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
« Last Edit: August 22, 2023, 02:08 by Jahanzaib »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5541
  • Country: dk
  • Reputation: 91
    • View Profile
    • QuantumATK at Synopsys
Re: Error
« Reply #1 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.