class_docstr: A fast, circular FIFO buffer in numpy with minimal memory interactions by using an array of index pointers
class_docstr_tok: ["A","fast",",","circular","FIFO","buffer","in","numpy","with","minimal","memory","interactions","by","using","an","array","of","index","pointers"]
code: def __init__(
      self,
      n_windows,
      samples_per_window,
      dtype=np.float32,
      start_value=0,
      data_dimensions=1,
  ):
      self.n_windows = n_windows
      self.data_dimensions = data_dimensions
      self.samples_per_window = samples_per_window
      self.data = start_value * np.ones(
          (self.n_windows, self.samples_per_window), dtype=dtype
      )
  
      if self.data_dimensions == 1:
          self.total_samples = self.n_windows * self.samples_per_window
      else:
          self.total_samples = self.n_windows
  
      self.elements_in_buffer = 0
      self.overwrite_index = 0
  
      self.indices = np.arange(self.n_windows, dtype=np.int32)
      self.last_window_id = np.max(self.indices)
      self.index_order = np.argsort(self.indices)
  
file_path: rt-audio-fft/src/utils.py
imports: import numpy
  import math, scipy, pygame
label_desc: Use image node_id 1 to create a new numpy_data_buffer object  with example: obj = numpy_data_buffer(n_windows, samples_per_window, dtype, start_value, data_dimensions)