File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ def _get_given_output(self, input_type_name):
112112 corresponding_pins .append (pin )
113113 return corresponding_pins
114114
115+ def __getitem__ (self , index ):
116+ return self ._outputs [index ]
117+
115118 def __str__ (self ):
116119 docstr = "Available outputs:\n "
117120 for output in self ._outputs :
Original file line number Diff line number Diff line change @@ -263,7 +263,12 @@ def eval(self):
263263 >>> fc = disp.on_all_time_freqs.eval()
264264
265265 """
266- fc = self .__call__ ().outputs .fields_container ()
266+ outputs = self .__call__ ().outputs
267+ if hasattr (outputs , "fields_container" ):
268+ fc = outputs .fields_container ()
269+ else :
270+ # Support operators where the first output is not named "field_container"
271+ fc = outputs [0 ]()
267272 if self ._specific_fc_type == "shape" :
268273 fc = ElShapeFieldsContainer (fields_container = fc ._get_ownership (), server = fc ._server )
269274 elif self ._specific_fc_type == "body" :
You can’t perform that action at this time.
0 commit comments