From 5a44c3708b0b55c5dbf2b6371f41fd5e2db78e8f Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Sun, 22 Dec 2013 22:38:39 +0100 Subject: [PATCH] Fix no output_file for yaml and numpy analyzer serializers --- timeside/analyzer/core.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/timeside/analyzer/core.py b/timeside/analyzer/core.py index 1633275..0da2341 100644 --- a/timeside/analyzer/core.py +++ b/timeside/analyzer/core.py @@ -894,7 +894,7 @@ class AnalyzerResultContainer(dict): results.add(res) return results - def to_yaml(self, output_file): + def to_yaml(self, output_file=None): #if data_list == None: data_list = self.results import yaml @@ -932,8 +932,11 @@ class AnalyzerResultContainer(dict): results.add(res) return results - def to_numpy(self, output_file): - numpy.save(output_file, self) + def to_numpy(self, output_file=None): + if output_file: + numpy.save(output_file, self) + else: + return self @staticmethod def from_numpy(input_file): -- 2.39.5