035083f62466d569f2fbc576c887cf770bc5b057,plotnine/stats/stat_density.py,,compute_density,#Any#Any#Any#,136
Before Change
return pd.DataFrame({
"x": x,
"density": weight / np.sum(weight),
"scaled": weight / np.max(weight),
"count": 1,
"n": n})
After Change
n = len(x)
if n == 0 or (n == 1 and isinstance(bw, str)):
if n == 1:
warn("To compute the density of a group with only one "
"value set the bandwidth manually. e.g `bw=0.1`",
PlotnineWarning)
warn("Groups with fewer than 2 data points have been removed.",
PlotnineWarning)
return pd.DataFrame()
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: has2k1/plotnine
Commit Name: 035083f62466d569f2fbc576c887cf770bc5b057
Time: 2019-09-24
Author: has2k1@gmail.com
File Name: plotnine/stats/stat_density.py
Class Name:
Method Name: compute_density
Project Name: yzhao062/pyod
Commit Name: 723b3caa59d1a3b0b42f42c1d4d05494406cebcc
Time: 2018-12-03
Author: zain.nasrullah@ca.pwc.com
File Name: pyod/models/lscp.py
Class Name: LSCP
Method Name: _get_decision_scores
Project Name: metric-learn/metric-learn
Commit Name: 130cbadff294b686e466d430f26b2d069f6bbf59
Time: 2019-06-07
Author: 31916524+wdevazelhes@users.noreply.github.com
File Name: metric_learn/nca.py
Class Name: NCA
Method Name: fit
Project Name: nilearn/nilearn
Commit Name: 08833a03ac8b71bdc2f48dffca17d4415bfad3ac
Time: 2014-02-06
Author: virgile.fritsch@gmail.com
File Name: nilearn/mass_univariate/permuted_least_squares.py
Class Name:
Method Name: permuted_ols