34849fc7f8892aa4f1000c20bd82b66f749b6cee,dipy/tracking/utils.py,,random_seeds_from_mask,#,415

Before Change


        for s in where:
            // Set the random seed with the current seed, the current value of
            // seeds per voxel and the global random seed.
            s_random_seed = None
            if random_seed is not None:
                s_random_seed = hash((np.sum(s) + 1) * i + random_seed) \
                           % (2**32 - 1)
            np.random.seed(s_random_seed)
            // Generate random triplet
            grid = np.random.random(3)
            seed = s + grid - .5
            seeds.append(seed)

After Change


            if random_seed is not None:
                s_random_seed = hash((np.sum(s) + 1) * i + random_seed) \
                           % (2**32 - 1)
                np.random.seed(s_random_seed)
            // Generate random triplet
            grid = np.random.random(3)
            seed = s + grid - .5
            seeds.append(seed)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: nipy/dipy
Commit Name: 34849fc7f8892aa4f1000c20bd82b66f749b6cee
Time: 2018-08-17
Author: guillaume.theaud@gmail.com
File Name: dipy/tracking/utils.py
Class Name:
Method Name: random_seeds_from_mask


Project Name: nipy/dipy
Commit Name: 34849fc7f8892aa4f1000c20bd82b66f749b6cee
Time: 2018-08-17
Author: guillaume.theaud@gmail.com
File Name: dipy/tracking/local/localtracking.py
Class Name: LocalTracking
Method Name: _generate_streamlines