/usr/lib/python2.7/dist-packages/dipy/core/tests/test_subdivide_octahedron.py is in python-dipy 0.10.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import numpy as np
from numpy.testing import assert_array_almost_equal
from dipy.core.subdivide_octahedron import create_unit_sphere
def test_create_unit_sphere():
sphere = create_unit_sphere(7)
v, e, f = sphere.vertices, sphere.edges, sphere.faces
assert_array_almost_equal((v*v).sum(1), 1)
def create_half_unit_sphere():
sphere = create_half_unit_sphere(7)
v, e, f = sphere.vertices, sphere.edges, sphere.faces
assert_array_almost_equal((v*v).sum(1), 1)
|