parameters: (hkl)
return_statement: return eqvlab, lab
docstring: FINDEQVS runs through array of hkls and labels those that are equivalent
      %in the m-3m point group.
      %
      % there are n reflections.
      % hkl has dimensions nx3
      % eqvlab has dimensions nx1
docstring_summary: FINDEQVS runs through array of hkls and labels those that are equivalent
      %in the m-3m point group.
      %
      % there are n reflections.
      % hkl has dimensions nx3
      % eqvlab has dimensions nx1
docstring_tokens: FINDEQVS runs through array of hkls and labels those that are equivalent %in the m - 3m point group . % % there are n reflections . % hkl has dimensions nx3 % eqvlab has dimensions nx1
function: def findeqvs(hkl):
      '''
      FINDEQVS runs through array of hkls and labels those that are equivalent
      %in the m-3m point group.
      %
      % there are n reflections.
      % hkl has dimensions nx3
      % eqvlab has dimensions nx1
      '''
      n, m = hkl.shape
      eqvlab = np.zeros(n)
      lab = 1
      for i in range(n):
          if eqvlab[i] == 0:  # then it's not been checked yet, so check it
              eqvlab[i] = lab
              refhkl = np.array([abs(hkl[i][0]), abs(hkl[i][1]), abs(hkl[i][2])])
              for j in range(i + 1, n):  # check remaining indices
                  comphkl = np.array(
                      [abs(hkl[j][0]), abs(hkl[j][1]), abs(hkl[j][2])])
                  # all possible permutations
                  permcomphkl = list(itt.permutations(comphkl))
                  nperm = len(permcomphkl)
                  for k in range(nperm):
                      if refhkl[0] == permcomphkl[k][0] and refhkl[1] == permcomphkl[k][1] and \
                                      refhkl[2] == permcomphkl[k][2]:
                          eqvlab[j] = lab
          lab += 1
  
      return eqvlab, lab
function_tokens: def findeqvs ( hkl ) : n , m = hkl . shape eqvlab = np . zeros ( n ) lab = 1 for i in range ( n ) : if eqvlab [ i ] == 0 : # then it's not been checked yet, so check it eqvlab [ i ] = lab refhkl = np . array ( [ abs ( hkl [ i ] [ 0 ] ) , abs ( hkl [ i ] [ 1 ] ) , abs ( hkl [ i ] [ 2 ] ) ] ) for j in range ( i + 1 , n ) : # check remaining indices comphkl = np . array ( [ abs ( hkl [ j ] [ 0 ] ) , abs ( hkl [ j ] [ 1 ] ) , abs ( hkl [ j ] [ 2 ] ) ] ) # all possible permutations permcomphkl = list ( itt . permutations ( comphkl ) ) nperm = len ( permcomphkl ) for k in range ( nperm ) : if refhkl [ 0 ] == permcomphkl [ k ] [ 0 ] and refhkl [ 1 ] == permcomphkl [ k ] [ 1 ] and refhkl [ 2 ] == permcomphkl [ k ] [ 2 ] : eqvlab [ j ] = lab lab += 1 return eqvlab , lab