58756c9467c5bce5e47ad1af8d7b3e634fa437b6,plotnine/stats/stat_boxplot.py,stat_boxplot,compute_group,#Any#Any#Any#,71
Before Change
@classmethod
def compute_group(cls, data, scales, **params):
try:
weights = np.array(data["weight"])
except KeyError:
weights = np.ones(len(data["y"]))
y = np.array(data["y"])
res = weighted_boxplot_stats(y, weights=weights, whis=params["coef"])
After Change
@classmethod
def compute_group(cls, data, scales, **params):
y = data["y"].to_numpy()
weights = data.get("weight", None)
total_weight = len(y) if weights is None else np.sum(weights)
res = weighted_boxplot_stats(y, weights=weights, whis=params["coef"])
if len(np.unique(data["x"])) > 1:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: has2k1/plotnine
Commit Name: 58756c9467c5bce5e47ad1af8d7b3e634fa437b6
Time: 2020-12-15
Author: has2k1@gmail.com
File Name: plotnine/stats/stat_boxplot.py
Class Name: stat_boxplot
Method Name: compute_group
Project Name: WZBSocialScienceCenter/tmtoolkit
Commit Name: 08633bd190028ad3cbe4c13b352b9efeae90f17e
Time: 2019-03-22
Author: markus.konrad@wzb.eu
File Name: tmtoolkit/topicmod/tm_gensim.py
Class Name: MultiprocEvaluationWorkerGensim
Method Name: fit_model
Project Name: scipy/scipy
Commit Name: 99acbc72c3ab0b6b254a824e284c3e4f01c4cde7
Time: 2020-11-10
Author: grlee77@gmail.com
File Name: scipy/ndimage/tests/test_interpolation.py
Class Name: TestNdimageInterpolation
Method Name: test_boundary_spline_accuracy
Project Name: scipy/scipy
Commit Name: 06cd6e5d439364383937a0cfc2896872e3a56547
Time: 2011-10-01
Author: pav@iki.fi
File Name: scipy/sparse/sputils.py
Class Name:
Method Name: upcast