File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -694,10 +694,8 @@ class CenterMassOutputSpec(TraitedSpec):
694694 desc = 'output file' )
695695 cm_file = File (
696696 desc = 'file with the center of mass coordinates' )
697- cm = traits .Either (
697+ cm = traits .List (
698698 traits .Tuple (traits .Float (), traits .Float (), traits .Float ()),
699- traits .List (traits .Tuple (traits .Float (), traits .Float (),
700- traits .Float ())),
701699 desc = 'center of mass' )
702700
703701
@@ -734,11 +732,8 @@ def _list_outputs(self):
734732 outputs = super (CenterMass , self )._list_outputs ()
735733 outputs ['out_file' ] = os .path .abspath (self .inputs .in_file )
736734 outputs ['cm_file' ] = os .path .abspath (self .inputs .cm_file )
737- sout = np .loadtxt (outputs ['cm_file' ]) # pylint: disable=E1101
738- if len (sout ) > 1 :
739- outputs ['cm' ] = [tuple (s ) for s in sout ]
740- else :
741- outputs ['cm' ] = tuple (sout )
735+ sout = np .loadtxt (outputs ['cm_file' ], ndmin = 2 ) # pylint: disable=E1101
736+ outputs ['cm' ] = [tuple (s ) for s in sout ]
742737 return outputs
743738
744739
You can’t perform that action at this time.
0 commit comments