class_docstr: test AnalyzerResult factory for all AnalyzerResult classes
class_docstr_tok: ["test","AnalyzerResult","factory","for","all","AnalyzerResult","classes"]
docstr: Data methods for Framewise & Label Result
docstr_tok: ["Data","methods","for","Framewise","&","Label","Result"]
code: def test_FrameLabelResult(self):
      "Data methods for Framewise & Label Result"
      self.time_mode = "framewise"
      self.data_mode = "label"
      self.result = AnalyzerResult(self.data_mode, self.time_mode)
      # Audio
      self.audio_start = np.random.rand(1) * 50
      # Expected data
      nb_frames = 200
      blocksize = 1024
      stepsize = 512
      samplerate = 44100
      self.data = np.random.randint(10, size=nb_frames)
      self.duration = blocksize / samplerate * np.ones(nb_frames)
      self.time = (
          np.arange(0, nb_frames * stepsize, stepsize) / samplerate
      )
      # Set data in result
      self.result.data_object.label = self.data
      self.result.data_object.frame_metadata.blocksize = blocksize
      self.result.data_object.frame_metadata.stepsize = stepsize
      self.result.data_object.frame_metadata.samplerate = samplerate
      self.result.audio_metadata.start = self.audio_start
  
imports: from __future__ import division
  import unittest
  from unit_timeside import TestRunner
  from timeside.core.analyzer import AnalyzerResult
  import numpy
label_desc: Use image node_id 4 for calling the TestAnalyzerResult_Data_Methods obj's underlying member method code with example usage: obj.test_FrameLabelResult() without return types