class_docstr: Phase class.
  
  Parameters
  ----------
  stft : :class:`ShortTimeFourierTransform` instance
       :class:`ShortTimeFourierTransform` instance.
  kwargs : dict, optional
      If no :class:`ShortTimeFourierTransform` instance was given, one is
      instantiated with these additional keyword arguments.
  
  Examples
  --------
  Create a :class:`Phase` from a :class:`ShortTimeFourierTransform` (or
  anything it can be instantiated from:
  
  >>> stft = ShortTimeFourierTransform('tests/data/audio/sample.wav')
  >>> phase = Phase(stft)
  >>> phase  # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS +NORMALIZE_FFT
  Phase([[ 3.14159, -0.85649, ..., -3.14016,  0.00779],
         [ 3.14159,  0.78355, ..., -2.70136,  1.81393],
         ...,
         [ 3.14159, -1.16063, ..., -0.4373 ,  1.33774],
         [ 3.14159,  0.42799, ..., -0.0142 ,  3.13592]], dtype=float32)
class_docstr_tok: ["Phase","class",".","Parameters","--","--","--","--","--","stft",":",":","class",":","`","ShortTimeFourierTransform","`","instance",":","class",":","`","ShortTimeFourierTransform","`","instance",".","kwargs",":","dict",",","optional","If","no",":","class",":","`","ShortTimeFourierTransform","`","instance","was","given",",","one","is","instantiated","with","these","additional","keyword","arguments",".","Examples","--","--","--","--","Create","a",":","class",":","`","Phase","`","from","a",":","class",":","`","ShortTimeFourierTransform","`","(","or","anything","it","can","be","instantiated","from",":",">",">",">","stft","=","ShortTimeFourierTransform","(","'tests\/data\/audio\/sample.wav","'",")",">",">",">","phase","=","Phase","(","stft",")",">",">",">","phase","#","doctest",":","+NORMALIZE_WHITESPACE","+ELLIPSIS","+NORMALIZE_FFT","Phase","(","[","[","3.14159",",","-0.85649",",","...",",","-3.14016",",","0.00779","]",",","[","3.14159",",","0.78355",",","...",",","-2.70136",",","1.81393","]",",","...",",","[","3.14159",",","-1.16063",",","...",",","-0.4373",",","1.33774","]",",","[","3.14159",",","0.42799",",","...",",","-0.0142",",","3.13592","]","]",",","dtype=float32",")"]
code: def __new__(cls, stft, **kwargs):
      # pylint: disable=unused-argument
      # if a Phase object is given use its STFT
      if isinstance(stft, Phase):
          stft = stft.stft
      # instantiate a ShortTimeFourierTransform object if needed
      if not isinstance(stft, ShortTimeFourierTransform):
          # set circular_shift if it was not disables explicitly
          circular_shift = kwargs.pop("circular_shift", True)
          stft = ShortTimeFourierTransform(
              stft, circular_shift=circular_shift, **kwargs
          )
      # TODO: just recalculate with circular_shift set?
      if not stft.circular_shift:
          warnings.warn(
              "`circular_shift` of the STFT must be set to 'True' "
              "for correct phase",
              RuntimeWarning,
          )
      # process the STFT and cast the result as Phase
      obj = np.asarray(phase(stft)).view(cls)
      # save additional attributes
      obj.stft = stft
      # return the object
      return obj
  
imports: from __future__ import absolute_import, division, print_function
  import warnings
  import numpy
  import scipy.fftpack
  from ..processors import Processor
  from .signal import Signal, FramedSignal
label_desc: Use image node_id 2 for calling the Phase obj's underlying member method code with example usage: obj.__new__(cls, stft) and returns: obj