Skip to content

Commit ac25885

Browse files
committed
SOF-7417: chore ==> rewrite the ternary condition
1 parent 2304b3c commit ac25885

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

express/properties/non_scalar/two_dimensional_plot/band_structure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self, name, parser, *args, **kwargs):
2525
# and we return the same for versions above 6.4 if noncolin is True.
2626
# However, for non-collinear magnetic case there are one eigenvalue per
2727
# k-pont. Here we override nspins for non-collinear case.
28-
self.nspins = self.parser.nspins() if self.parser.nspins() != 4 else 1
28+
self.nspins = 1 if self.parser.nspins() == 4 else self.parser.nspins()
2929

3030
self.eigenvalues_at_kpoints = self.parser.eigenvalues_at_kpoints()
3131
if kwargs.get("remove_non_zero_weight_kpoints", False):

0 commit comments

Comments
 (0)