eba587e7549e252036f2500e9a3b3a18a778b335,dataset/batch_image.py,ImagesBatch,assemble,#ImagesBatch#Any#,250

Before Change


        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

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):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: gboeing/osmnx
Commit Name: e988155c5cc529b5d075a18b36455c54e3c5b4b9
Time: 2021-03-14
Author: boeing@usc.edu
File Name: osmnx/distance.py
Class Name:
Method Name: nearest_edges


Project Name: nilearn/nilearn
Commit Name: 3daedc17ddab948752f3d6b90e56b177ea77ec42
Time: 2014-02-26
Author: virgile.fritsch@gmail.com
File Name: nilearn/mass_univariate/permuted_least_squares.py
Class Name:
Method Name: permuted_ols