class_docstr: The Activations class extends a numpy ndarray with a frame rate (fps)
  attribute.
  
  Parameters
  ----------
  data : str, file handle or numpy array
      Either file name/handle to read the data from or array.
  fps : float, optional
      Frames per second (must be set if `data` is given as an array).
  sep : str, optional
      Separator between activation values (if read from file).
  dtype : numpy dtype
      Data-type the activations are stored/saved/kept.
  
  Attributes
  ----------
  fps : float
      Frames per second.
  
  Notes
  -----
  If a filename or file handle is given, an undefined or empty separator
  means that the file should be treated as a numpy binary file.
  Only binary files can store the frame rate of the activations.
  Text files should not be used for anything else but manual inspection
  or I/O with other programs.
docstr: Save the activations to a file.
  
  Parameters
  ----------
  outfile : str or file handle
      Output file name or file handle.
  sep : str, optional
      Separator between activation values if saved as text file.
  fmt : str, optional
      Format of the values if saved as text file.
  
  Notes
  -----
  An undefined or empty separator means that the file should be treated
  as a numpy binary file.
  Only binary files can store the frame rate of the activations.
  Text files should not be used for anything else but manual inspection
  or I/O with other programs.
  
  If the activations are a 1D array, its values are interpreted as
  features of a single time step, i.e. all values are printed in a single
  line. If you want each value to appear in an individual line, use '\n'
  as a separator.
  
  If the activations are a 2D array, the first axis corresponds to the
  time dimension, i.e. the features are separated by `sep` and the time
  steps are printed in separate lines. If you like to swap the
  dimensions, please use the `T` attribute.
docstr_tok: ["Save","the","activations","to","a","file",".","Parameters","--","--","--","--","--","outfile",":","str","or","file","handle","Output","file","name","or","file","handle",".","sep",":","str",",","optional","Separator","between","activation","values","if","saved","as","text","file",".","fmt",":","str",",","optional","Format","of","the","values","if","saved","as","text","file",".","Notes","--","--","-","An","undefined","or","empty","separator","means","that","the","file","should","be","treated","as","a","numpy","binary","file",".","Only","binary","files","can","store","the","frame","rate","of","the","activations",".","Text","files","should","not","be","used","for","anything","else","but","manual","inspection","or","I\/O","with","other","programs",".","If","the","activations","are","a","1D","array",",","its","values","are","interpreted","as","features","of","a","single","time","step",",","i.e",".","all","values","are","printed","in","a","single","line",".","If","you","want","each","value","to","appear","in","an","individual","line",",","use","'\\n'","as","a","separator",".","If","the","activations","are","a","2D","array",",","the","first","axis","corresponds","to","the","time","dimension",",","i.e",".","the","features","are","separated","by","`","sep","`","and","the","time","steps","are","printed","in","separate","lines",".","If","you","like","to","swap","the","dimensions",",","please","use","the","`","T","`","attribute","."]
code: def save(self, outfile, sep=None, fmt="%.5f"):
      """
      Save the activations to a file.
  
      Parameters
      ----------
      outfile : str or file handle
          Output file name or file handle.
      sep : str, optional
          Separator between activation values if saved as text file.
      fmt : str, optional
          Format of the values if saved as text file.
  
      Notes
      -----
      An undefined or empty separator means that the file should be treated
      as a numpy binary file.
      Only binary files can store the frame rate of the activations.
      Text files should not be used for anything else but manual inspection
      or I/O with other programs.
  
      If the activations are a 1D array, its values are interpreted as
      features of a single time step, i.e. all values are printed in a single
      line. If you want each value to appear in an individual line, use '\\n'
      as a separator.
  
      If the activations are a 2D array, the first axis corresponds to the
      time dimension, i.e. the features are separated by `sep` and the time
      steps are printed in separate lines. If you like to swap the
      dimensions, please use the `T` attribute.
  
      """
  
      # save the activations
      if sep in [None, ""]:
          # numpy binary format
          npz = {"activations": self, "fps": self.fps}
          np.savez(outfile, **npz)
      else:
          if self.ndim > 2:
              raise ValueError(
                  "Only 1D and 2D activations can be saved in "
                  "human readable text format."
              )
          # simple text format
          header = "FPS:%f" % self.fps
          np.savetxt(
              outfile,
              np.atleast_2d(self),
              fmt=fmt,
              delimiter=sep,
              header=header,
          )
      # TODO: check if closing the file is really the best option to avoid
      #       fails in tests/test_bin.py
      try:
          outfile.close()
      except AttributeError:
          # a string filename cannot be closed
          pass
  
imports: from __future__ import absolute_import, division, print_function
  import numpy
  from ..processors import Processor
  from .None import beats, chords, downbeats, key, notes, onsets, tempo
  from .beats import BeatDetectionProcessor, BeatTrackingProcessor, CRFBeatDetectionProcessor, DBNBeatTrackingProcessor, MultiModelSelectionProcessor, RNNBeatProcessor
  from .chords import CNNChordFeatureProcessor, CRFChordRecognitionProcessor, DeepChromaChordRecognitionProcessor
  from .downbeats import RNNDownBeatProcessor, DBNDownBeatTrackingProcessor, PatternTrackingProcessor, RNNBarProcessor, DBNBarTrackingProcessor
  from .key import CNNKeyRecognitionProcessor
  from .notes import CNNPianoNoteProcessor, ADSRNoteTrackingProcessor, NoteOnsetPeakPickingProcessor, NotePeakPickingProcessor, RNNPianoNoteProcessor
  from .onsets import CNNOnsetProcessor, OnsetPeakPickingProcessor, RNNOnsetProcessor, SpectralOnsetProcessor
  from .tempo import TempoEstimationProcessor
label_desc: Use image node_id 5 for calling the Activations obj's underlying member method code with example usage: obj.save(outfile, sep, fmt) without return types