parameters: (dates, period)
return_statement: return np.nonzero(current - previous)[0]
docstring: Returns the indices where the given period changes.
  
      Parameters
      ----------
      dates : PeriodIndex
          Array of intervals to monitor.
      period : string
          Name of the period to monitor.
docstring_summary: Returns the indices where the given period changes.
docstring_tokens: Returns the indices where the given period changes .
function: def period_break(dates, period):
      """
      Returns the indices where the given period changes.
  
      Parameters
      ----------
      dates : PeriodIndex
          Array of intervals to monitor.
      period : string
          Name of the period to monitor.
      """
      current = getattr(dates, period)
      previous = getattr(dates - 1 * dates.freq, period)
      return np.nonzero(current - previous)[0]
function_tokens: def period_break ( dates , period ) : current = getattr ( dates , period ) previous = getattr ( dates - 1 * dates . freq , period ) return np . nonzero ( current - previous ) [ 0 ]