Skip to content

Commit

Permalink
TEST: Attempt to solve nan problem in python 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelNH committed Jul 14, 2015
1 parent 862b2f4 commit a597042
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dipy/core/tests/test_geometry.py
Expand Up @@ -6,6 +6,8 @@

import random

import math

from dipy.core.geometry import (sphere2cart, cart2sphere,
nearest_pos_semi_def,
sphere_distance,
Expand Down Expand Up @@ -281,7 +283,7 @@ def test_perpendicular_directions():
# check if directions are sampled by multiples of 2*pi / num
delta_a = 2 * np.pi / num
for d in pd:
angle = np.arccos(np.dot(pd[0], d))
angle = math.arccos(np.dot(pd[0], d))
rest = angle % delta_a
if rest > delta_a * 0.99: # To correct cases of negative error
rest = rest - delta_a
Expand Down

0 comments on commit a597042

Please sign in to comment.