2a1bd4c93a998d16516d82893401b346d66a95e9,imgaug/dtypes.py,,get_minimal_dtype,#Any#Any#,58
Before Change
for array in arrays]
promoted_dt = np.promote_types(*input_dts)
if increase_itemsize_factor > 1:
promoted_dt_highres = "%s%d" % (promoted_dt.kind, promoted_dt.itemsize * increase_itemsize_factor)
try:
promoted_dt_highres = np.dtype(promoted_dt_highres)
return promoted_dt_highres
except TypeError:
After Change
// This loop construct handles (1) list of a single dtype, (2) list of two
// dtypes and (3) list of 3+ dtypes. Note that promote_dtypes() always
// expects exactly two dtypes.
promoted_dt = input_dts[0]
input_dts = input_dts[1:]
while len(input_dts) >= 1:
promoted_dt = np.promote_types(promoted_dt, input_dts[0])
input_dts = input_dts[1:]
if increase_itemsize_factor > 1:
assert isinstance(promoted_dt, np.dtype), (
"Expected numpy.dtype output from numpy.promote_dtypes, got type "
"%s." % (type(promoted_dt),))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: aleju/imgaug
Commit Name: 2a1bd4c93a998d16516d82893401b346d66a95e9
Time: 2019-07-19
Author: kontakt@ajung.name
File Name: imgaug/dtypes.py
Class Name:
Method Name: get_minimal_dtype
Project Name: nipy/dipy
Commit Name: a529601042d6d0cdd5eadcb3ceea7f1838cde45d
Time: 2014-03-08
Author: jomaroceguedag@gmail.com
File Name: dipy/align/metrics.py
Class Name: CCMetric
Method Name: compute_backward
Project Name: nipy/dipy
Commit Name: a529601042d6d0cdd5eadcb3ceea7f1838cde45d
Time: 2014-03-08
Author: jomaroceguedag@gmail.com
File Name: dipy/align/metrics.py
Class Name: CCMetric
Method Name: compute_forward