e165b44b4fa265c9419194640ccf833b675d8d40,scipy/stats/_binned_statistic.py,,binned_statistic_dd,#Any#Any#Any#Any#Any#Any#Any#,360
Before Change
result.fill(0)
flatcount = np.bincount(binnumbers, None)
a = flatcount.nonzero()
for i in np.unique(binnumbers):
for vv in builtins.range(Vdim):
// NOTE: take std dev by bin, np.std() is 2-pass and stable
result[vv, i] = np.std(values[vv, binnumbers == i])
elif statistic == "count":
result.fill(0)
flatcount = np.bincount(binnumbers, None)
a = np.arange(len(flatcount))
After Change
binned_data = values[vv, binnumbers == i]
// calc std only when binned data is 2 or more for speed up.
if len(binned_data) >= 2:
result[vv, i] = np.std(binned_data)
elif statistic == "count":
result.fill(0)
flatcount = np.bincount(binnumbers, None)
a = np.arange(len(flatcount))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: scipy/scipy
Commit Name: e165b44b4fa265c9419194640ccf833b675d8d40
Time: 2020-05-23
Author: asakai.amsl+github@gmail.com
File Name: scipy/stats/_binned_statistic.py
Class Name:
Method Name: binned_statistic_dd
Project Name: WheatonCS/Lexos
Commit Name: 3227c2ed4ae92c6b9ecfc1b2c614ff4c36bd9fd0
Time: 2017-07-21
Author: weltch1997@gmail.com
File Name: lexos/processors/analyze/information.py
Class Name: FileInformation
Method Name: __init__
Project Name: scipy/scipy
Commit Name: 2a28ba889d85c28e490b8b99aef8909e4602aff5
Time: 2019-06-30
Author: rlucas7@vt.edu
File Name: scipy/stats/_binned_statistic.py
Class Name:
Method Name: binned_statistic_dd