unravel_3d¶
- torch_sim.transforms.unravel_3d(idx_linear, shape)[source]¶
Convert linear indices back into 3D indices for an array of given shape.
This function takes linear indices, which are used to reference elements in a flattened array, and converts them back into 3D indices. The conversion is based on the provided shape of the array.
- Parameters:
- Returns:
- A tensor of shape [-1, 3]
containing the 3D indices corresponding to the input linear indices.
- Return type: