parameters: (T1, T2)
return_statement: return True
docstring: Determines if two different cluster assignments are equivalent.
  
      Parameters
      ----------
      T1 : array_like
          An assignment of singleton cluster ids to flat cluster ids.
      T2 : array_like
          An assignment of singleton cluster ids to flat cluster ids.
  
      Returns
      -------
      b : bool
          Whether the flat cluster assignments `T1` and `T2` are
          equivalent.
docstring_summary: Determines if two different cluster assignments are equivalent.
docstring_tokens: Determines if two different cluster assignments are equivalent .
function: def is_isomorphic(T1, T2):
      """
      Determines if two different cluster assignments are equivalent.
  
      Parameters
      ----------
      T1 : array_like
          An assignment of singleton cluster ids to flat cluster ids.
      T2 : array_like
          An assignment of singleton cluster ids to flat cluster ids.
  
      Returns
      -------
      b : bool
          Whether the flat cluster assignments `T1` and `T2` are
          equivalent.
  
      """
      T1 = np.asarray(T1, order='c')
      T2 = np.asarray(T2, order='c')
  
      if type(T1) != np.ndarray:
          raise TypeError('T1 must be a numpy array.')
      if type(T2) != np.ndarray:
          raise TypeError('T2 must be a numpy array.')
  
      T1S = T1.shape
      T2S = T2.shape
  
      if len(T1S) != 1:
          raise ValueError('T1 must be one-dimensional.')
      if len(T2S) != 1:
          raise ValueError('T2 must be one-dimensional.')
      if T1S[0] != T2S[0]:
          raise ValueError('T1 and T2 must have the same number of elements.')
      n = T1S[0]
      d = {}
      for i in xrange(0, n):
          if T1[i] in d:
              if d[T1[i]] != T2[i]:
                  return False
          else:
              d[T1[i]] = T2[i]
      return True
function_tokens: def is_isomorphic ( T1 , T2 ) : T1 = np . asarray ( T1 , order = 'c' ) T2 = np . asarray ( T2 , order = 'c' ) if type ( T1 ) != np . ndarray : raise TypeError ( 'T1 must be a numpy array.' ) if type ( T2 ) != np . ndarray : raise TypeError ( 'T2 must be a numpy array.' ) T1S = T1 . shape T2S = T2 . shape if len ( T1S ) != 1 : raise ValueError ( 'T1 must be one-dimensional.' ) if len ( T2S ) != 1 : raise ValueError ( 'T2 must be one-dimensional.' ) if T1S [ 0 ] != T2S [ 0 ] : raise ValueError ( 'T1 and T2 must have the same number of elements.' ) n = T1S [ 0 ] d = { } for i in xrange ( 0 , n ) : if T1 [ i ] in d : if d [ T1 [ i ] ] != T2 [ i ] : return False else : d [ T1 [ i ] ] = T2 [ i ] return True