parameters: (arr, to_end=None, to_begin=None)
return_statement: return ed
docstring: Compute the differences between consecutive elements of an array.
  
      This function is the equivalent of `numpy.ediff1d` that takes masked
      values into account, see `numpy.ediff1d` for details.
  
      See Also
      --------
      numpy.ediff1d : Equivalent function for ndarrays.
docstring_summary: Compute the differences between consecutive elements of an array.
docstring_tokens: Compute the differences between consecutive elements of an array .
function: def ediff1d(arr, to_end=None, to_begin=None):
      """
      Compute the differences between consecutive elements of an array.
  
      This function is the equivalent of `numpy.ediff1d` that takes masked
      values into account, see `numpy.ediff1d` for details.
  
      See Also
      --------
      numpy.ediff1d : Equivalent function for ndarrays.
  
      """
      arr = ma.asanyarray(arr).flat
      ed = arr[1:] - arr[:-1]
      arrays = [ed]
      #
      if to_begin is not None:
          arrays.insert(0, to_begin)
      if to_end is not None:
          arrays.append(to_end)
      #
      if len(arrays) != 1:
          # We'll save ourselves a copy of a potentially large array in the common
          # case where neither to_begin or to_end was given.
          ed = hstack(arrays)
      #
      return ed
function_tokens: def ediff1d ( arr , to_end = None , to_begin = None ) : arr = ma . asanyarray ( arr ) . flat ed = arr [ 1 : ] - arr [ : - 1 ] arrays = [ ed ] # if to_begin is not None : arrays . insert ( 0 , to_begin ) if to_end is not None : arrays . append ( to_end ) # if len ( arrays ) != 1 : # We'll save ourselves a copy of a potentially large array in the common # case where neither to_begin or to_end was given. ed = hstack ( arrays ) # return ed