f698c4dbfc266bae9c1d1ceb0d906863c9b54e2e,dipy/core/sphere_stats.py,,random_uniform_on_sphere,#Any#Any#,9
Before Change
(4, 3)
"""
u = np.random.normal(0,1,(n,3))
u = u/np.sqrt(np.sum(u**2,axis=1)).reshape(n,1)
if coords=="xyz":
return u
else:
angles = np.zeros((n,2))
After Change
phi = np.random.uniform(0, 2*np.pi, n)
angles = np.hstack((theta, phi)).T
if coords == "xyz":
r = np.ones(n)
return np.hstack(geometry.sphere2cart(r, theta, phi)).T
if coords == "radians":
return angles
if coords == "degrees":
return np.rad2deg(angles)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: nipy/dipy
Commit Name: f698c4dbfc266bae9c1d1ceb0d906863c9b54e2e
Time: 2013-05-14
Author: caruyer@gmail.com
File Name: dipy/core/sphere_stats.py
Class Name:
Method Name: random_uniform_on_sphere
Project Name: epfl-lts2/pygsp
Commit Name: 508545f2c9a982a38a243ec95c7a5cdd266ed358
Time: 2017-11-23
Author: michael.defferrard@epfl.ch
File Name: pygsp/tests/test_graphs.py
Class Name: TestCase
Method Name: test_degree
Project Name: allenai/allennlp
Commit Name: 058c2e6963c597d8c613d85646e200c38c059971
Time: 2019-12-16
Author: eladsegal@users.noreply.github.com
File Name: allennlp/modules/conditional_random_field.py
Class Name: ConditionalRandomField
Method Name: viterbi_tags
Project Name: pymc-devs/pymc3
Commit Name: 66d22e8e91792efc7af482c1f1bad60ac3447397
Time: 2008-01-29
Author: anand.prabhakar.patil@15d7aa0b-6f1a-0410-991a-d59f85d14984
File Name: pymc/sandbox/test_Gibbs.py
Class Name: test_Gibbs
Method Name: check_GammaNormal