eba587e7549e252036f2500e9a3b3a18a778b335,dataset/batch_image.py,ImagesBatch,assemble,#ImagesBatch#Any#,250
Before Change
new_images = np.stack(all_res)
except ValueError as e:
message = str(e)
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
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
@action
def convert_to_pil(self, components="images"):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
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: mil-tokyo/webdnn
Commit Name: 2571186c26968de784585bdabf0c0979e9608a85
Time: 2017-04-20
Author: y.kikura@gmail.com
File Name: src/graph_builder/optimizer/util.py
Class Name:
Method Name: listup_operator_in_order
Project Name: catalyst-cooperative/pudl
Commit Name: f967bd87424bbc50f475d5959994a5743ae2af0e
Time: 2019-12-28
Author: zane.selvans@catalyst.coop
File Name: src/pudl/convert/epacems_to_parquet.py
Class Name:
Method Name: epacems_to_parquet