Skip to content

Commit eb62d54

Browse files
committed
Fix masked_replace_tool to use Fortran order for column-major layout
The GridMap specification requires column-major (Fortran) order when flattening arrays. Changed flatten() to flatten(order="F") to match the layout dimension labels (column_index, row_index).
1 parent 33a8672 commit eb62d54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/masked_replace_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def _numpy_to_multiarray(array: np.ndarray) -> Float32MultiArray:
195195
layout.dim.append(MultiArrayDimension(label="column_index", size=cols, stride=rows * cols))
196196
layout.dim.append(MultiArrayDimension(label="row_index", size=rows, stride=rows))
197197
msg.layout = layout
198-
msg.data = array.flatten().tolist()
198+
msg.data = array.flatten(order="F").tolist()
199199
return msg
200200

201201

0 commit comments

Comments
 (0)