Skip to content

Fix bind() batch dim for length-1 slices#3177

Open
Deeven-Seru wants to merge 1 commit intogoogle-deepmind:mainfrom
Deeven-Seru:fix/bind-slice-dimension
Open

Fix bind() batch dim for length-1 slices#3177
Deeven-Seru wants to merge 1 commit intogoogle-deepmind:mainfrom
Deeven-Seru:fix/bind-slice-dimension

Conversation

@Deeven-Seru
Copy link
Copy Markdown

@Deeven-Seru Deeven-Seru commented Mar 16, 2026

Fixes #3128.

  • Preserve batch dimension when binding length-1 slices in MuJoCo Python
    bindings.
  • Keep MJX bind behavior consistent by avoiding squeeze for length-1
    iterables.
  • Add regression tests for geom size/xpos binding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

model.bind() with a slice of length 1 unexpectedly squeezes the batch dimension

1 participant