bcb31499b3bab0b31e7f45c38e77571fa6ccb0c1,geomstats/_backend/tensorflow/__init__.py,,convert_to_wider_dtype,#Any#,85

Before Change


    wider_dtype = dtype_list[0]
    wider_dtype_index = DTYPES.index(wider_dtype)
    for dtype in dtype_list[1:]:
        index = DTYPES.index(dtype)
        if index > wider_dtype_index:
            wider_dtype = dtype
            wider_dtype_index = index
    tensor_list = [cast(x, dtype=wider_dtype) for x in tensor_list]

After Change


    dtype_list = [DTYPES[x.dtype] for x in tensor_list]
    wider_dtype_index = max(dtype_list)

    wider_dtype = list(DTYPES.keys())[wider_dtype_index]

    tensor_list = [cast(x, dtype=wider_dtype) for x in tensor_list]
    return tensor_list
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: geomstats/geomstats
Commit Name: bcb31499b3bab0b31e7f45c38e77571fa6ccb0c1
Time: 2020-05-06
Author: ninamio78@gmail.com
File Name: geomstats/_backend/tensorflow/__init__.py
Class Name:
Method Name: convert_to_wider_dtype


Project Name: facebookresearch/Horizon
Commit Name: edd80ff9c99783868de91ef14aeceb0be1dbb090
Time: 2018-03-29
Author: edoardoc@fb.com
File Name: ml/rl/test/gym/open_ai_gym_environment.py
Class Name: OpenAIGymEnvironment
Method Name: policy


Project Name: geomstats/geomstats
Commit Name: 6a534c44a8af152d38d833c370695e54ff1dfa20
Time: 2020-05-06
Author: ninamio78@gmail.com
File Name: geomstats/_backend/numpy/__init__.py
Class Name:
Method Name: convert_to_wider_dtype