529c4bc269f6c3a265d49b97393cbc6ecbcf5f94,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]

    if "style" in kwargs:

After Change



        cluster_labels = get_clusters(x, ndims, n_clusters)
        x = reshape_data(x,cluster_labels)
        del kwargs["n_clusters"]
        
        if "point_colors" in kwargs:
            warnings.warn("n_clusters overrides point_colors, ignoring point_colors.")
            del kwargs["point_colors"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


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: 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: CellProfiler/CellProfiler
Commit Name: 0469b770bd9846510c5b4872424443d72d5baa73
Time: 2009-12-18
Author: thouis@1fc53939-2000-0410-845c-e8453a809027
File Name: pyCellProfiler/cellprofiler/modules/measureobjectintensity.py
Class Name: MeasureObjectIntensity
Method Name: prepare_settings