7c2673280add4356814a56e5a4253bd959630e95,python/hypertools/plot/plot.py,,plot,#Any#,26
Before Change
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)
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"]
// handle point_colors flag
if "point_colors" in kwargs:
point_colors=kwargs["point_colors"]
del kwargs["point_colors"]
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 10
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: arnomoonens/yarll
Commit Name: 90f638b21e811e55c7a11fa087863431303b674b
Time: 2019-09-17
Author: arno.moonens@gmail.com
File Name: yarll/environment/__init__.py
Class Name:
Method Name: register_env
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: flow-project/flow
Commit Name: 78eb0338b2d4484cf39812ae4cd2078b4fc57fa3
Time: 2018-03-13
Author: akreidieh@gmail.com
File Name: flow/core/params.py
Class Name: InFlows
Method Name: add
Project Name: flow-project/flow
Commit Name: 07c33ef32f04297b940b306b1b587bdf1c1b0f6c
Time: 2018-03-14
Author: vinitsky.eugene@gmail.com
File Name: flow/core/params.py
Class Name: InFlows
Method Name: add