fb73633a42053e8a0b2ce71448bad938f33a8442,allennlp/data/dataset.py,Dataset,as_array_dict,#Dataset#Any#Any#,79

Before Change


        field_arrays = defaultdict(list)  // type: Dict[str, list]
        if verbose:
            logger.info("Now actually padding instances to length: %s", str(lengths_to_use))
            for instance in tqdm.tqdm(self.instances):
                for field, arrays in instance.as_array_dict(lengths_to_use).items():
                    field_arrays[field].append(arrays)
        else:
            for instance in self.instances:
                for field, arrays in instance.as_array_dict(lengths_to_use).items():
                    field_arrays[field].append(arrays)

After Change


        // Finally, we combine the arrays that we got for each instance into one big array (or set
        // of arrays) per field.
        for field_name, field_array_list in field_arrays.items():
            if field_name == "metadata":
                continue
            if isinstance(field_array_list[0], dict):
                // This is creating a dict of {token_indexer_key: batch_array} for each
                // token indexer used to index this field. This is mostly utilised by TextFields.
                token_indexer_key_to_batch_dict = defaultdict(list)  // type: Dict[str, List[numpy.ndarray]]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: allenai/allennlp
Commit Name: fb73633a42053e8a0b2ce71448bad938f33a8442
Time: 2017-08-30
Author: mattg@allenai.org
File Name: allennlp/data/dataset.py
Class Name: Dataset
Method Name: as_array_dict


Project Name: deepfakes/faceswap
Commit Name: 0e0b2faa1a205fe276a7c53bc600fca60b239234
Time: 2019-10-28
Author: vrooman.kyle@gmail.com
File Name: tools/sort.py
Class Name: Sort
Method Name: sort_face_yaw


Project Name: deepfakes/faceswap
Commit Name: 0e0b2faa1a205fe276a7c53bc600fca60b239234
Time: 2019-10-28
Author: vrooman.kyle@gmail.com
File Name: tools/sort.py
Class Name: Sort
Method Name: sort_face_cnn_dissim