f0ac6351b5ee28846121158b7f0cd34a109bef9a,niftynet/utilities/misc_io.py,,match_volume_shape_to_patch_definition,#Any#Any#,349

Before Change


    if patch is None:
        return None
    spatial_shape = list(image_data.shape[:int(np.ceil(patch.spatial_rank))])
    spatial_shape += [1]*(3-int(np.ceil(patch.spatial_rank)))
    return np.reshape(image_data,spatial_shape+[-1])


def spatial_padding_to_indexes(spatial_padding):

After Change



    //  always casting to 4D input volume [H x W x D x Modality]
    while image_data.ndim > 4:
        image_data = image_data[..., 0]
    while image_data.ndim < 4:
        image_data = np.expand_dims(image_data, axis=-1)
    return image_data


def spatial_padding_to_indexes(spatial_padding):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: NifTK/NiftyNet
Commit Name: f0ac6351b5ee28846121158b7f0cd34a109bef9a
Time: 2017-07-22
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/utilities/misc_io.py
Class Name:
Method Name: match_volume_shape_to_patch_definition


Project Name: prateekiiest/Code-Sleep-Python
Commit Name: 63153b69ca111622d7f31f7072d52e340d397a58
Time: 2017-11-20
Author: yashkothari199767@gmail.com
File Name: Prime/code.py
Class Name:
Method Name: is_prime


Project Name: geekcomputers/Python
Commit Name: 139259ac8ac83160502cbb896371ce4fa4027361
Time: 2019-10-10
Author: ml.smiley3@gmail.com
File Name: primelib/primelib.py
Class Name:
Method Name: isPrime