File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -694,10 +694,8 @@ class CenterMassOutputSpec(TraitedSpec):
694
694
desc = 'output file' )
695
695
cm_file = File (
696
696
desc = 'file with the center of mass coordinates' )
697
- cm = traits .Either (
697
+ cm = traits .List (
698
698
traits .Tuple (traits .Float (), traits .Float (), traits .Float ()),
699
- traits .List (traits .Tuple (traits .Float (), traits .Float (),
700
- traits .Float ())),
701
699
desc = 'center of mass' )
702
700
703
701
@@ -735,10 +733,7 @@ def _list_outputs(self):
735
733
outputs ['out_file' ] = os .path .abspath (self .inputs .in_file )
736
734
outputs ['cm_file' ] = os .path .abspath (self .inputs .cm_file )
737
735
sout = np .loadtxt (outputs ['cm_file' ], ndmin = 2 ) # pylint: disable=E1101
738
- if len (sout ) > 1 :
739
- outputs ['cm' ] = [tuple (s ) for s in sout ]
740
- else :
741
- outputs ['cm' ] = tuple (sout [0 ])
736
+ outputs ['cm' ] = [tuple (s ) for s in sout ]
742
737
return outputs
743
738
744
739
You can’t perform that action at this time.
0 commit comments