433cd5e10c9af9e74f97a2de2abb3142c36bb6a0,eat/factor.py,,factor,#Any#,3

Before Change


        Site-based data being factored out

    
    sites = np.unique(np.append(bb["ref"], bb["rem"]))
    types = [("site", sites.dtype), ("value", "f8")]
    sb    = np.array([(s, 0) for s in sites], dtype=types)

    return sb

After Change



    
    sites = list(set(bb["ref"]) | set(bb["rem"]))
    sol   = [0.0] * len(sites)

    return {s:sol[i] for i, s in enumerate(sites)}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: sao-eht/eat
Commit Name: 433cd5e10c9af9e74f97a2de2abb3142c36bb6a0
Time: 2017-07-04
Author: ckchan@cfa.harvard.edu
File Name: eat/factor.py
Class Name:
Method Name: factor


Project Name: biotite-dev/biotite
Commit Name: 874ead481476247acfcfe06b02a07df3f3c97e0f
Time: 2020-12-05
Author: anter.jacob@gmail.com
File Name: src/biotite/structure/charges.py
Class Name:
Method Name: _get_parameters


Project Name: bokeh/bokeh
Commit Name: d065784874671ef36edc22dfdb3e53155f219b39
Time: 2017-03-30
Author: jsignell@gmail.com
File Name: examples/plotting/file/jitter.py
Class Name:
Method Name:


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 374ca541aaf62aba88a144acbbc7398ca3e995ef
Time: 2018-11-26
Author: jcastaldo08@gmail.com
File Name: category_encoders/ordinal.py
Class Name: OrdinalEncoder
Method Name: ordinal_encoding