From f3b27a690c0e04f63768183cdc4aeda6b40f2608 Mon Sep 17 00:00:00 2001 From: Martin Schlipf Date: Fri, 10 Jan 2020 15:50:28 +0100 Subject: [PATCH] Only use length of array instead of whole array --- src/py4vasp/data/dos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/py4vasp/data/dos.py b/src/py4vasp/data/dos.py index 2408b36..3215d51 100644 --- a/src/py4vasp/data/dos.py +++ b/src/py4vasp/data/dos.py @@ -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)