cratepy.ioput.readprocedures.read_clustering_scheme

read_clustering_scheme(file, file_path, line_number)[source]

Read material phase’s prescribed clustering scheme.

Parameters:
  • file (file) – Data file.

  • file_path (str) – Data file path.

  • line_number (int) – Data file line where the material phase’s clustering scheme prescription begins.

Returns:

  • clustering_scheme (numpy.ndarray of shape (n_clusterings, 3)) – Clustering scheme stored as a numpy.ndarray of shape (n_clusterings, 3). Each row is associated with a unique clustering characterized by a clustering algorithm (col 1, int), a list of clustering features (col 2, list[int]), and a list of the clustering features data matrix’ indexes (col 3, list[int]).

  • line_number (int) – Data file line where the material phase’s clustering scheme prescription ends.