Skip to content

Commit

Permalink
Merge branch 'ershi/np-concat-fix' into 'main'
Browse files Browse the repository at this point in the history
Use np.concatenate for Python 3.8 compatibility

See merge request omniverse/warp!872
  • Loading branch information
mmacklin committed Nov 19, 2024
2 parents 9d63ffd + c9f8965 commit abadc64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions warp/sim/graph_coloring.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def convert_to_color_groups(num_colors, particle_colors, return_wp_array=False,
wp.launch(kernel=count_color_group_size, inputs=[particle_colors, group_sizes], device="cpu", dim=1)

group_sizes_np = group_sizes.numpy()
group_offsets_np = np.concat([np.array([0]), np.cumsum(group_sizes_np)])
group_offsets_np = np.concatenate([np.array([0]), np.cumsum(group_sizes_np)])
group_offsets = wp.array(group_offsets_np, dtype=int, device="cpu")

group_fill_count = wp.zeros(shape=(num_colors,), dtype=int, device="cpu")
Expand Down Expand Up @@ -283,7 +283,7 @@ def combine_independent_particle_coloring(color_groups_1, color_groups_2):
group_2 = color_groups_2_sorted[i] if i < len(color_groups_2) else None

if group_1 is not None and group_2 is not None:
color_groups_combined.append(np.concat([group_1, group_2]))
color_groups_combined.append(np.concatenate([group_1, group_2]))
elif group_1 is not None:
color_groups_combined.append(group_1)
else:
Expand Down

0 comments on commit abadc64

Please sign in to comment.