From: Guillaume Pellerin Date: Sun, 22 Dec 2013 21:38:39 +0000 (+0100) Subject: Fix no output_file for yaml and numpy analyzer serializers X-Git-Tag: 0.5.3~33 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=5a44c3708b0b55c5dbf2b6371f41fd5e2db78e8f;p=timeside.git Fix no output_file for yaml and numpy analyzer serializers --- 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):