We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6f17fb commit ceee7eaCopy full SHA for ceee7ea
pygsp/graphs/nngraphs/sphereicosahedron.py
@@ -20,6 +20,7 @@ class SphereIcosahedron(NNGraph):
20
Examples
21
--------
22
>>> import matplotlib.pyplot as plt
23
+ >>> from mpl_toolkits.mplot3d import Axes3D
24
>>> G = graphs.SphereIcosahedron(level=1)
25
>>> fig = plt.figure()
26
>>> ax1 = fig.add_subplot(121)
@@ -44,7 +45,7 @@ def __init__(self, level=5, sampling='vertex', **kwargs):
44
45
1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8,
46
3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9,
47
4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1]
- self.faces = np.reshape(faces, (20,3))-1
48
+ self.faces = np.reshape(faces, (20, 3))
49
self.level = level
50
self.intp = None
51
@@ -127,7 +128,7 @@ def normalize(self, radius=1):
127
128
129
def xyz2latlong(self):
130
x, y, z = self.coords[:, 0], self.coords[:, 1], self.coords[:, 2]
- long = np.arctan2(y, x)
131
+ long = np.arctan2(y, x) + np.pi
132
xy2 = x**2 + y**2
133
lat = np.arctan2(z, np.sqrt(xy2))
134
return lat, long
setup.py
@@ -39,6 +39,8 @@
39
# 'graph-tool', cannot be installed by pip
40
# Construct patch graphs from images.
41
'scikit-image',
42
+ # Construct Sphere graph
43
+ 'healpy',
# Approximate nearest neighbors for kNN graphs.
'pyflann; python_version == "2.*"',
'pyflann3; python_version == "3.*"',
0 commit comments