8a9344ead3be54cf1d427b30888e0e84ffe4d20a,hypertools/tools/format_data.py,,format_data,#,5

Before Change


        }

        // filter and convert to numpy array
        text_data = [np.array(i).reshape(-1, 1) for i,j in zip(x, dtypes) if j in ["list_str", "str"]]

        // convert text to numerical matrices
        text_data = text2mat(text_data, **text_args)

After Change


            kwargs.update(text_args)

        // filter text data
        text_data = []
        for i,j in zip(x, dtypes):
            if j in ["list_str", "str"]:
                text_data.append(np.array(i).reshape(-1, 1))
            elif j is "vecobj":
                text_data.append(i)

        // convert text to numerical matrices
        text_data = text2mat(text_data, **kwargs)

    // replace the text data with transformed data
    for i, dtype in enumerate(dtypes):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 11

Instances


Project Name: ContextLab/hypertools
Commit Name: 8a9344ead3be54cf1d427b30888e0e84ffe4d20a
Time: 2018-01-22
Author: andrew.heusser@gmail.com
File Name: hypertools/tools/format_data.py
Class Name:
Method Name: format_data


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 7b4291717410b3ce7f0c572481e5de226a76bd9c
Time: 2020-07-06
Author: p3rf@google.com
File Name: perfkitbenchmarker/linux_packages/nvidia_driver.py
Class Name:
Method Name: GetGpuType


Project Name: mindsdb/mindsdb
Commit Name: 8f9a654acb01dd242c2a6b58c0f5e1a0bdb4bf71
Time: 2021-02-23
Author: george@cerebralab.com
File Name: mindsdb/utilities/functions.py
Class Name:
Method Name: get_all_models_meta_data


Project Name: geekcomputers/Python
Commit Name: 61cec329110539ccc2793a7f541df4e73d5d4f45
Time: 2020-05-18
Author: arnavanand1500@gmail.com
File Name: Print_List_of_Even_Numbers.py
Class Name:
Method Name: