Skip to content

Commit

Permalink
Merge pull request diku-dk#107 from Jax922/bugfix/numpy-type-issue
Browse files Browse the repository at this point in the history
Fix numpy type compatibility issue
  • Loading branch information
erleben authored Oct 1, 2023
2 parents 7628ead + 5639583 commit 2b7baff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions python/rainbow/geometry/surface_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def profile_sweep(profile, slices):
F = 2 * J * (N - 2) # Total number of triangle faces

V = np.zeros((K, 3), dtype=np.float64)
T = np.zeros((F, 3), dtype=np.int)
T = np.zeros((F, 3), dtype=int)

# Make a 2D grid of vertices by sweeping profile around y-axis
dtheta = 2.0 * np.pi / J # The angle of each slice
Expand Down Expand Up @@ -253,7 +253,7 @@ def create_cuboid(p0, p1, p2, p3, p4, p5, p6, p7):
:return:
"""
V = np.zeros((8, 3), dtype=np.float64)
T = np.zeros((12, 3), dtype=np.int)
T = np.zeros((12, 3), dtype=int)

V[0, :] = p0
V[1, :] = p1
Expand Down Expand Up @@ -342,7 +342,7 @@ def create_convex_hull(points):
N = len(H.points) # Number of vertices
K = len(H.vertices) # Number of triangles
V = np.zeros((N, 3), dtype=np.float64)
T = np.zeros((K, 3), dtype=np.int)
T = np.zeros((K, 3), dtype=int)
for idx, p in enumerate(H.points):
V[idx, :] = p
for idx, v in enumerate(H.vertices):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def solve(J, WJT, b, mu, friction_solver, engine, stats, debug_on, prefix):
stats[prefix + "lambda"] = np.zeros(
[engine.params.max_iterations] + list(b.shape), dtype=np.float64
)
stats[prefix + "reject"] = np.zeros(engine.params.max_iterations, dtype=np.bool)
stats[prefix + "reject"] = np.zeros(engine.params.max_iterations, dtype=bool)
stats[prefix + "exitcode"] = 0
stats[prefix + "iterations"] = engine.params.max_iterations
timer.start()
Expand Down

0 comments on commit 2b7baff

Please sign in to comment.