Skip to content
Snippets Groups Projects
Commit 2c932348 authored by Anton Akhmerov's avatar Anton Akhmerov Committed by Christoph Groth
Browse files

fix a bug in grouping modes according to eigenvalue

parent 2f7ba6a8
No related branches found
No related tags found
No related merge requests found
......@@ -266,6 +266,10 @@ def make_proper_modes(lmbdainv, psi, extract, project, tol=1e6):
boundaries = np.argwhere(np.abs(np.diff(lmbdainv[sort_order]))
> eps).flatten() + 1
# Detect the singular case of all eigenvalues equal.
if boundaries.shape == (0,) and len(angles):
boundaries = np.array([0, len(angles)])
for interval in izip(boundaries[:-1], boundaries[1:]):
if interval[1] > boundaries[0] + len(angles):
break
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment