]> git.parisson.com Git - timeside.git/commitdiff
cleanup, sandbox: test hdf5
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 31 Oct 2013 23:06:46 +0000 (00:06 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 31 Oct 2013 23:06:46 +0000 (00:06 +0100)
tests/sandbox/test_parent.py
timeside/core.py

index 4852464e2fea6aace7d3b9d0d3b16ec56d8abf49..84df1fcba3527793ee87ce399ecfd1443e0f7099 100644 (file)
@@ -8,6 +8,9 @@ source = os.path.join(os.path.dirname(__file__), "../samples/sweep.wav")
 d = timeside.decoder.FileDecoder(source)
 a  = timeside.analyzer.OnsetDetectionFunction()
 
-(d | a).run()
+pipe = d | a
+pipe.run()
 
-print a.results
\ No newline at end of file
+print pipe.results
+
+a.results.to_hdf5('../results/sweep_odf.hdf5')
index 2e9541084aa951d07ef3c2b35fc73609a7af86f5..426ffaecb1538781361a3dab3c2d9ee3089434f1 100644 (file)
@@ -253,9 +253,8 @@ class ProcessPipe(object):
     def __ior__(self, other):
         if isinstance(other, Processor):
             parents = other.parents
-            if parents:
-                for parent in parents:
-                    self |= parent
+            for parent in parents:
+                self |= parent
             self.processors.append(other)
         elif isinstance(other, ProcessPipe):
             self.processors.extend(other.processors)