b68ca4d6b22f2efd73581b9843d5ac2aeffcb6f7,niftynet/engine/windows_aggregator_base.py,ImageWindowsAggregator,crop_batch,#Any#Any#Any#,77

Before Change


        
        if border == ():
            border = (0, 0, 0)
        assert len(border) == 3, \
            "unknown border format (should be an array of" \
            "three elements corresponding to 3 spatial dims"

        location = location.astype(np.int)
        window_shape = window.shape
        spatial_shape = window_shape[1:-1]

After Change


        assert isinstance(border, (list, tuple)), \
            "border should be a list or tuple"
        while len(border) < N_SPATIAL:
            border = tuple(border) + (border[-1],)
        border = border[:N_SPATIAL]

        location = location.astype(np.int)
        window_shape = window.shape
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: NifTK/NiftyNet
Commit Name: b68ca4d6b22f2efd73581b9843d5ac2aeffcb6f7
Time: 2018-09-13
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/windows_aggregator_base.py
Class Name: ImageWindowsAggregator
Method Name: crop_batch


Project Name: hyperopt/hyperopt
Commit Name: e8380a03134a586a554643abdef0944c3651b771
Time: 2011-10-22
Author: dyamins@gmail.com
File Name: hyperopt/theano_gp.py
Class Name: GP_BanditAlgo
Method Name: GP_EI_optimize


Project Name: hyperopt/hyperopt
Commit Name: 8b91f0dd2f2c3ee53f94d3b846e1a931e151f9b3
Time: 2011-10-21
Author: dyamins@gmail.com
File Name: hyperopt/gdist.py
Class Name: gChoice
Method Name: theano_sampler_helper