f49809322491c857d435bb12f5de7b09aac2d181,linearmodels/panel/data.py,PanelData,mean,#PanelData#Any#Any#,378

Before Change


            mu /= np.nansum(w, axis=axis)

        index = self.panel.minor_axis if group == "entity" else self.panel.major_axis
        out = DataFrame(mu.T, index=index, columns=self.vars)
        reindex = self.entities if group == "entity" else self.time
        out = out.loc[reindex]
        return out

After Change


        
        level = 0 if group == "entity" else 1
        if weights is None:
            mu = self._frame.groupby(level=level).mean()
        else:
            w = weights.values2d
            frame = self._frame.copy()
            frame = w * frame
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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: EducationalTestingService/factor_analyzer
Commit Name: 43063b67c4cadf93381188a50169758af7948569
Time: 2018-05-22
Author: jbiggs@ets.org
File Name: factor_analyzer/factor_analyzer.py
Class Name: FactorAnalyzer
Method Name: analyze


Project Name: bashtage/linearmodels
Commit Name: 134db0b8216e32dd6d91a57f7d18409a6028720f
Time: 2017-04-04
Author: kevin.k.sheppard@gmail.com
File Name: linearmodels/tests/panel/test_between_ols.py
Class Name:
Method Name: test_missing