Skip to content

Commit

Permalink
Activate tox -e py27/35
Browse files Browse the repository at this point in the history
Change-Id: I58bdf7617cc6f73a48bb90b61d797d2831e4949e
  • Loading branch information
Benoît Coste committed Dec 19, 2018
1 parent f276328 commit d4713f9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
30 changes: 15 additions & 15 deletions tns/morphmath/random_tree.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from numpy import random
import numpy as np
import rotation as rt
from tns.morphmath.rotation import rotate_vector
from tns.morphmath.utils import norm


Expand Down Expand Up @@ -48,10 +48,10 @@ def get_bif_symmetric(direction, angles):
# dir1 = rt.vector_from_spherical(phi + phi1, theta + theta1)
# dir2 = rt.vector_from_spherical(phi - phi1, theta - theta1)

dir1 = rt.rotate_vector(direction, [0, 0, 1], phi1)
dir1 = rt.rotate_vector(dir1, [1, 0, 0], theta1)
dir2 = rt.rotate_vector(direction, [0, 0, 1], - phi1)
dir2 = rt.rotate_vector(dir2, [1, 0, 0], - theta1)
dir1 = rotate_vector(direction, [0, 0, 1], phi1)
dir1 = rotate_vector(dir1, [1, 0, 0], theta1)
dir2 = rotate_vector(direction, [0, 0, 1], - phi1)
dir2 = rotate_vector(dir2, [1, 0, 0], - theta1)

return (np.array(dir1), np.array(dir2))

Expand All @@ -68,10 +68,10 @@ def get_bif_bio_oriented(direction, angles):
# dir1 = rt.vector_from_spherical(phi - phi0, theta - theta0)
# dir2 = rt.vector_from_spherical(phi - phi0 - phi1, theta - theta0 - theta1)

dir1 = rt.rotate_vector(direction, [0, 0, 1], phi0)
dir1 = rt.rotate_vector(dir1, [1, 0, 0], theta0)
dir2 = rt.rotate_vector(dir1, [0, 0, 1], phi1)
dir2 = rt.rotate_vector(dir2, [1, 0, 0], theta1)
dir1 = rotate_vector(direction, [0, 0, 1], phi0)
dir1 = rotate_vector(dir1, [1, 0, 0], theta0)
dir2 = rotate_vector(dir1, [0, 0, 1], phi1)
dir2 = rotate_vector(dir2, [1, 0, 0], theta1)

return (np.array(dir1), np.array(dir2))

Expand Down Expand Up @@ -109,8 +109,8 @@ def get_bif_directional(direction, angles):
# dir1 = rt.vector_from_spherical(phi, theta)
# dir2 = rt.vector_from_spherical(phi - phi1, theta - theta1)

dir2 = rt.rotate_vector(direction, [0, 0, 1], phi1)
dir2 = rt.rotate_vector(dir2, [1, 0, 0], theta1)
dir2 = rotate_vector(direction, [0, 0, 1], phi1)
dir2 = rotate_vector(dir2, [1, 0, 0], theta1)

return (np.array(direction), np.array(dir2))

Expand All @@ -125,9 +125,9 @@ def get_bif_directional(direction, angles):
# dir1 = rt.vector_from_spherical(phi + phi0, theta + theta0)
# dir2 = rt.vector_from_spherical(phi - phi0, theta - theta0)

# dir1 = rt.rotate_vector(direction, [0,0,1], phi0)
# dir1 = rt.rotate_vector(dir1, [1,0,0], theta0)
# dir2 = rt.rotate_vector(dir1, [0,0,1], phi1)
# dir2 = rt.rotate_vector(dir2, [1,0,0], theta1)
# dir1 = rotate_vector(direction, [0,0,1], phi0)
# dir1 = rotate_vector(dir1, [1,0,0], theta0)
# dir2 = rotate_vector(dir1, [0,0,1], phi1)
# dir2 = rotate_vector(dir2, [1,0,0], theta1)

# return (np.array(dir1), np.array(dir2))
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ commands = true | pylint {[base]name}

[testenv:py27]
deps = {[base]testdeps}
commands = true | nosetests
commands = nosetests

[testenv:py35]
deps = {[base]testdeps}
commands = true | nosetests
commands = nosetests

[testenv:coverage]
deps =
Expand Down

0 comments on commit d4713f9

Please sign in to comment.