refactoring empty array creation

This commit is contained in:
hjosmelvy 2023-02-09 19:04:57 -05:00
parent 4e79b53ffd
commit 51ae3893a7
3 changed files with 1 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@ -367,8 +367,7 @@ class SolutionBase:
# output stream names. # output stream names.
solution_outputs = collections.namedtuple( solution_outputs = collections.namedtuple(
'SolutionOutputs', self._output_stream_type_info.keys()) 'SolutionOutputs', self._output_stream_type_info.keys())
empty_list = [[] for _ in range(len(solution_outputs._fields))] results = solution_outputs(*([""] * len(solution_outputs._fields)))
results = solution_outputs(*(empty_list))
for stream_name in self._output_stream_type_info.keys(): for stream_name in self._output_stream_type_info.keys():
if stream_name in self._graph_outputs: if stream_name in self._graph_outputs:
results = results._replace(**{stream_name: self._get_packet_content( results = results._replace(**{stream_name: self._get_packet_content(