63455151483578a69b75197c2f7d880ff89a96a2,tensorflow_transform/beam/impl.py,_RunMetaGraphDoFn,_get_passthrough_data_from_recordbatch,#_RunMetaGraphDoFn#Any#,319

Before Change


    result = {}
    for passthrough_key, column_index in zip(
        self._passthrough_keys, self._passthrough_column_indices):
      result[passthrough_key] = np.asarray(batch.column(column_index).flatten())
    return result

  def _handle_batch(self, batch):

After Change


    result = {}
    for passthrough_key, column_index in zip(self._passthrough_keys,
                                             self._passthrough_column_indices):
      passthrough_data_column = batch.column(column_index)
      // the passthrough column should be of list<primitive> type with each
      // sub-list being either null or of length 1.
      assert (
          pa.types.is_list(passthrough_data_column.type) or
          pa.types.is_large_list(passthrough_data_column.type))
      result[passthrough_key] = [
          None if elem is None else elem[0]
          for elem in passthrough_data_column.to_pylist()
      ]
    return result
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: tensorflow/transform
Commit Name: 63455151483578a69b75197c2f7d880ff89a96a2
Time: 2020-04-24
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/beam/impl.py
Class Name: _RunMetaGraphDoFn
Method Name: _get_passthrough_data_from_recordbatch


Project Name: NifTK/NiftyNet
Commit Name: 01c3a882833dc5031df2f4440717870b35e4833a
Time: 2017-05-29
Author: wenqi.li@ucl.ac.uk
File Name: utilities/subject.py
Class Name: Subject
Method Name: load_column


Project Name: NifTK/NiftyNet
Commit Name: 98136785f012628517fa5290a697d743ce97b093
Time: 2017-05-29
Author: wenqi.li@ucl.ac.uk
File Name: layer/volume_loader.py
Class Name: VolumeLoaderLayer
Method Name: num_modality