class_docstr: Decoder taking Numpy array as input
class_docstr_tok: ["Decoder","taking","Numpy","array","as","input"]
code: def setup(self, channels=None, samplerate=None, blocksize=None):
      # the output data format we want
      if blocksize:
          self.output_blocksize = blocksize
      if samplerate:
          self.output_samplerate = int(samplerate)
      if channels:
          self.output_channels = int(channels)
  
      if self.uri_duration is None:
          self.uri_duration = (
              len(self.samples) / self.input_samplerate - self.uri_start
          )
  
      if self.is_segment:
          start_index = np.floor(
              self.uri_start * self.input_samplerate
          ).astype(np.int)
          stop_index = start_index
          stop_index += np.ceil(
              self.uri_duration * self.input_samplerate
          ).astype(np.int)
          stop_index = min(stop_index, len(self.samples))
          self.samples = self.samples[start_index:stop_index]
  
      if not self.output_samplerate:
          self.output_samplerate = self.input_samplerate
  
      if not self.output_channels:
          self.output_channels = self.input_channels
  
      self.input_totalframes = len(self.samples)
      self.input_duration = (
          self.input_totalframes / self.input_samplerate
      )
      self.input_width = self.samples.itemsize * 8
  
file_path: TimeSide/timeside/plugins/decoder/array.py
imports: from timeside.core import implements, interfacedoc
  from timeside.core.decoder import Decoder, IDecoder
  import numpy
label_desc: Use image node_id 3 for calling the ArrayDecoder obj's underlying member method code with example usage: obj.setup(channels, samplerate, blocksize) without return types