7c2673280add4356814a56e5a4253bd959630e95,python/hypertools/plot/plot.py,,plot,#Any#,26

Before Change


        elif all(isinstance(el, str) for el in point_colors):
            point_colors = group_by_category(point_colors)

        categories = list(set(np.sort(point_colors)))
        x_stacked = np.vstack(x)
        x_reshaped = [[] for i in categories]
        for idx,point in enumerate(point_colors):
            x_reshaped[categories.index(point)].append(x_stacked[idx])
        x = [np.vstack(i) for i in x_reshaped]

After Change



    ////HYPERTOOLS-SPECIFIC ARG PARSING////

    if "n_clusters" in kwargs:
        n_clusters=kwargs["n_clusters"]

        if "ndims" in kwargs:
            ndims = kwargs["ndims"]
        else:
            ndims = 3

        cluster_labels = get_clusters(x, ndims, n_clusters)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: ContextLab/hypertools
Commit Name: 7c2673280add4356814a56e5a4253bd959630e95
Time: 2016-12-22
Author: andrew.heusser@gmail.com
File Name: python/hypertools/plot/plot.py
Class Name:
Method Name: plot


Project Name: ContextLab/hypertools
Commit Name: 529c4bc269f6c3a265d49b97393cbc6ecbcf5f94
Time: 2016-12-22
Author: andrew.heusser@gmail.com
File Name: python/hypertools/plot/plot.py
Class Name:
Method Name: plot


Project Name: mlpack/benchmarks
Commit Name: bfbc7582aa9e6a3e1fde6679663232f1f3f1d1fa
Time: 2019-04-24
Author: rukman.sai2@gmail.com
File Name: methods/shogun/lda.py
Class Name: SHOGUN_LDA
Method Name: __init__