From fe88b375158b216d416eaf38e68960e694d82ed2 Mon Sep 17 00:00:00 2001 From: "Oleg E. Peil" Date: Fri, 11 Dec 2015 10:57:48 +0100 Subject: [PATCH] Fixed a bug in determining dimensions in converter Since 'n_orbitals' can be a 2D array in case of spin-polarized calculations, one should use 'numpy.max' instead of 'max' to extract the maximum number of bands. --- python/converters/vasp_converter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/converters/vasp_converter.py b/python/converters/vasp_converter.py index b830975d..81d49e05 100644 --- a/python/converters/vasp_converter.py +++ b/python/converters/vasp_converter.py @@ -227,7 +227,7 @@ class VaspConverter(ConverterTools): # Projectors # print n_orbitals # print [crsh['dim'] for crsh in corr_shells] - proj_mat = numpy.zeros([n_k, n_spin_blocs, n_corr_shells, max([crsh['dim'] for crsh in corr_shells]), max(n_orbitals)], numpy.complex_) + proj_mat = numpy.zeros([n_k, n_spin_blocs, n_corr_shells, max([crsh['dim'] for crsh in corr_shells]), numpy.max(n_orbitals)], numpy.complex_) # TODO: implement reading from more than one projector group # In 'dmftproj' each ion represents a separate correlated shell.