eba587e7549e252036f2500e9a3b3a18a778b335,dataset/batch_image.py,ImagesBatch,assemble,#ImagesBatch#Any#,250
Before Change
if "must have the same shape" in message:
min_shape = np.array([x.shape for x in all_res]).min(axis=0)
all_res = [arr[:min_shape[0], :min_shape[1]].copy() for arr in all_res]
new_images = np.stack(all_res)
setattr(self, component, new_images)
return self
@action
After Change
raise RuntimeError("Could not assemble the batch")
components = kwargs.get("components", "images")
if isinstance(components, (list, tuple)):
all_res = list(zip(*all_res))
else:
components = [components]
all_res = [all_res]
for component, res in zip(components, all_res):
self.assemble_component(all_res, component)
setattr(self, component, new_data)
return self
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: analysiscenter/batchflow
Commit Name: eba587e7549e252036f2500e9a3b3a18a778b335
Time: 2017-11-17
Author: rhudor@gmail.com
File Name: dataset/batch_image.py
Class Name: ImagesBatch
Method Name: assemble
Project Name: kenshohara/3D-ResNets-PyTorch
Commit Name: 371a1b952acb0d2cccaf3ece7f594763d3f02e03
Time: 2018-11-02
Author: kensho.hara@aist.go.jp
File Name: datasets/videodataset.py
Class Name: VideoDataset
Method Name: __getitem__
Project Name: pymc-devs/pymc3
Commit Name: 225ae82fa59eebcb13d322a4f7642afdbc534fd5
Time: 2019-11-03
Author: thecakedev@hotmail.com
File Name: pymc3/ode/utils.py
Class Name:
Method Name: augment_system