parameters: (self, filename, pts)
docstring: Loads an index previously saved to disk.
docstring_summary: Loads an index previously saved to disk.
docstring_tokens: Loads an index previously saved to disk .
function: def load_index(self, filename, pts):
          """
          Loads an index previously saved to disk.
          """
  
          if pts.dtype.type not in allowed_types:
              raise FLANNException('Cannot handle type: %s' % pts.dtype)
  
          pts = ensure_2d_array(pts, default_flags)
          npts, dim = pts.shape
  
          if self.__curindex is not None:
              flann.free_index[self.__curindex_type](
                  self.__curindex, pointer(self.__flann_parameters))
              self.__curindex = None
              self.__curindex_data = None
              self.__curindex_type = None
  
          self.__curindex = flann.load_index[pts.dtype.type](
              c_char_p(to_bytes(filename)), pts, npts, dim)
          self.__curindex_data = pts
          self.__curindex_type = pts.dtype.type
function_tokens: def load_index ( self , filename , pts ) : if pts . dtype . type not in allowed_types : raise FLANNException ( 'Cannot handle type: %s' % pts . dtype ) pts = ensure_2d_array ( pts , default_flags ) npts , dim = pts . shape if self . __curindex is not None : flann . free_index [ self . __curindex_type ] ( self . __curindex , pointer ( self . __flann_parameters ) ) self . __curindex = None self . __curindex_data = None self . __curindex_type = None self . __curindex = flann . load_index [ pts . dtype . type ] ( c_char_p ( to_bytes ( filename ) ) , pts , npts , dim ) self . __curindex_data = pts self . __curindex_type = pts . dtype . type