Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 6, 2023
1 parent 0349106 commit 29d3986
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion graph_weather/models/graphs/ico.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def inside_points(vAB, vAC):
"""

out = []
if vAB.shape[0] == 1: # Optimized code fails for nu=2
if vAB.shape[0] == 1: # Optimized code fails for nu=2
v = []
for i in range(1, vAB.shape[0]):
w = np.arange(1, i + 1) / (i + 1)
Expand Down Expand Up @@ -306,6 +306,7 @@ def generate_icosphere_graph(resolution=1):
edges = np.unique(np.sort(edges, axis=1), axis=0)
return vertices, edges


vertex, edges = generate_icosphere_graph(2)
print(f"Vertices: {vertex.shape}")
print(f"Edges: {edges.shape}")
Expand All @@ -318,6 +319,7 @@ def generate_icosphere_graph(resolution=1):
print(f"Vertices: {np.isclose(vertex2[:12], vertex)}")
exit()


def generate_icosphere_mapping(lat_lons, resolutions=(1, 2, 3, 4, 5, 6, 7)):
"""
Generate mapping from lat/lon to icosphere index.
Expand Down

0 comments on commit 29d3986

Please sign in to comment.