f49809322491c857d435bb12f5de7b09aac2d181,linearmodels/panel/data.py,PanelData,mean,#PanelData#Any#Any#,378
Before Change
mu = np.nanmean(v, axis=axis)
else:
w = weights.values3d
w = w * np.isfinite(v)
wv = w * v
mu = np.nansum(wv, axis=axis)
mu /= np.nansum(w, axis=axis)
After Change
frame = self._frame.copy()
frame = w * frame
weighted_sum = frame.groupby(level=level).sum()
frame.iloc[:, :] = w
sum_weights = frame.groupby(level=level).sum()
mu = weighted_sum / sum_weights
reindex = self.entities if group == "entity" else self.time
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: bashtage/linearmodels
Commit Name: f49809322491c857d435bb12f5de7b09aac2d181
Time: 2017-04-14
Author: kevin.k.sheppard@gmail.com
File Name: linearmodels/panel/data.py
Class Name: PanelData
Method Name: mean
Project Name: CellProfiler/CellProfiler
Commit Name: 9175c1e1585f52482bcab20425754daefa4ed1e8
Time: 2015-10-06
Author: leek@broadinstitute.org
File Name: cellprofiler/modules/measurecorrelation.py
Class Name: MeasureCorrelation
Method Name: run_image_pair_objects
Project Name: automl/SMAC3
Commit Name: 1a1d444b0d02c0c484decfb03bf57b18d4af0e85
Time: 2016-12-19
Author: marius.rks@googlemail.com
File Name: smac/epm/rfr_imputator.py
Class Name: RFRImputator
Method Name: impute