Skip to content

Commit

Permalink
check if array is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
samwaseda committed Dec 5, 2023
1 parent 59cf8d6 commit e190ee1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyiron_atomistics/sphinx/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2299,6 +2299,8 @@ def collect_electrostatic_potential(self, file_name, cwd):

def _get_electronic_structure_object(self):
es = ElectronicStructure()
if len(self.generic.dft.bands_eigen_values) == 0:
return es
eig_mat = self.generic.dft.bands_eigen_values[-1]
occ_mat = self.generic.dft.bands_occ[-1]
if len(eig_mat.shape) == 3:
Expand Down

0 comments on commit e190ee1

Please sign in to comment.