Skip to content

Commit

Permalink
Merge branch '8-dos-energies-read-in-every-read_element-call' into 'm…
Browse files Browse the repository at this point in the history
…aster'

Resolve "Dos energies read in every read_element call"

Closes orest-d#8

See merge request schlipf/py4vasp!7
  • Loading branch information
martin-schlipf committed Jan 10, 2020
2 parents 76bbc20 + f3b27a6 commit 1799c84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/py4vasp/data/dos.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,5 @@ def _merge_labels(self, labels):

def _read_element(self, index):
sum_dos = lambda dos, i: dos + self._partial_dos[i]
zero_dos = np.zeros_like(self._energies[:])
zero_dos = np.zeros(len(self._energies))
return functools.reduce(sum_dos, itertools.product(*index), zero_dos)

0 comments on commit 1799c84

Please sign in to comment.