5627564c2e1f987881027bc121fa16e4c6073b01,matchzoo/utils/rank_io.py,,convert_embed_2_numpy,#,88

Before Change



// Convert Embedding Dict 2 numpy array
def convert_embed_2_numpy(embed_dict, max_size=0, embed=None):
    feat_size = len(embed_dict[embed_dict.keys()[0]])
    if embed is None:
        embed = np.zeros( (max_size, feat_size), dtype = np.float32 )
    for k in embed_dict:
        embed[k] = np.array(embed_dict[k])
    print("Generate numpy embed: %s", str(embed.shape), end="\n")

After Change



// Convert Embedding Dict 2 numpy array
def convert_embed_2_numpy(embed_dict, max_size=0, embed=None):
    feat_size = len(embed_dict[list(embed_dict.keys())[0]])
    if embed is None:
        embed = np.zeros( (max_size, feat_size), dtype = np.float32 )
    for k in embed_dict:
        embed[k] = np.array(embed_dict[k])
    print("Generate numpy embed: %s", str(embed.shape), end="\n")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: NTMC-Community/MatchZoo
Commit Name: 5627564c2e1f987881027bc121fa16e4c6073b01
Time: 2017-12-06
Author: fanyixing111@hotmail.com
File Name: matchzoo/utils/rank_io.py
Class Name:
Method Name: convert_embed_2_numpy


Project Name: chainer/chainercv
Commit Name: 6a2b43c9318a0b1ac52beb75aa86d207f70c05d9
Time: 2017-06-17
Author: yuyuniitani@gmail.com
File Name: chainercv/links/model/vgg/vgg16.py
Class Name: VGG16Layers
Method Name: functions


Project Name: chainer/chainercv
Commit Name: c8cdc36586f47208e50be9ae93c5a40746349a7e
Time: 2017-07-04
Author: yuyuniitani@gmail.com
File Name: chainercv/links/model/sequential_feature_extractor.py
Class Name: SequentialFeatureExtractor
Method Name: __init__


Project Name: google/deepvariant
Commit Name: 25d024f957cc5e4fc187b86fa5e7df96c9b992f5
Time: 2019-11-18
Author: marianattestad@google.com
File Name: deepvariant/vcf_stats_vis.py
Class Name:
Method Name: _dict_to_dataframe